mirror of
https://github.com/xtaci/kcptun.git
synced 2024-04-21 12:32:32 +00:00
fix termination sequence
This commit is contained in:
@@ -74,6 +74,7 @@ func handleClient(mux generic.Mux, p1 net.Conn, ctrl *generic.CopyControl, quiet
|
||||
}
|
||||
|
||||
go streamCopy(p1, p2)
|
||||
// errors reading from p1(net.Conn) can close p2 while return
|
||||
streamCopy(p2, p1)
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -140,8 +140,9 @@ func handleClient(p1 io.ReadWriteCloser, p2 net.Conn, ctrl *generic.CopyControl,
|
||||
}
|
||||
}
|
||||
|
||||
go streamCopy(p1, p2)
|
||||
streamCopy(p2, p1)
|
||||
go streamCopy(p2, p1)
|
||||
// errors reading from p2(net.Conn) can close p1 while return
|
||||
streamCopy(p1, p2)
|
||||
}
|
||||
|
||||
func checkError(err error) {
|
||||
|
||||
Reference in New Issue
Block a user