소스 검색

clean up sessions

v2ray 9 년 전
부모
커밋
aa38488712
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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