Browse Source

clean up sessions

v2ray 9 years ago
parent
commit
aa38488712
1 changed files with 3 additions and 0 deletions
  1. 3 0
      transport/internet/kcp/listener.go

+ 3 - 0
transport/internet/kcp/listener.go

@@ -121,6 +121,9 @@ func (this *Listener) Close() error {
 
 
 	this.running = false
 	this.running = false
 	close(this.awaitingConns)
 	close(this.awaitingConns)
+	for _, conn := range this.sessions {
+		go conn.Terminate()
+	}
 	this.hub.Close()
 	this.hub.Close()
 
 
 	return nil
 	return nil