mirror of https://github.com/v2ray/v2ray-core
still need this goroutine
parent
f30841019d
commit
3f0f8f005d
|
@ -47,12 +47,15 @@ func (vconn *FreedomConnection) Start(ray core.OutboundRay) error {
|
|||
go dumpInput(conn, input, writeFinish)
|
||||
go dumpOutput(conn, output, readFinish)
|
||||
|
||||
<-writeFinish
|
||||
if tcpConn, ok := conn.(*net.TCPConn); ok {
|
||||
tcpConn.CloseWrite()
|
||||
}
|
||||
<-readFinish
|
||||
conn.Close()
|
||||
go func() {
|
||||
<-writeFinish
|
||||
if tcpConn, ok := conn.(*net.TCPConn); ok {
|
||||
tcpConn.CloseWrite()
|
||||
}
|
||||
<-readFinish
|
||||
conn.Close()
|
||||
}()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue