Explorar el Código

prevent goroutine leak

v2ray hace 9 años
padre
commit
7f277c9bcc
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      transport/internet/kcp/connection.go

+ 2 - 0
transport/internet/kcp/connection.go

@@ -392,6 +392,8 @@ func (this *Connection) Terminate() {
 	log.Info("KCP|Connection: Terminating connection to ", this.RemoteAddr())
 
 	this.SetState(StateTerminated)
+	this.dataInputCond.Broadcast()
+	this.dataOutputCond.Broadcast()
 	this.writer.Close()
 }