Explorar el Código

clean up sessions

v2ray hace 9 años
padre
commit
aa38488712
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  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
 	close(this.awaitingConns)
+	for _, conn := range this.sessions {
+		go conn.Terminate()
+	}
 	this.hub.Close()
 
 	return nil