fix termination sequence

This commit is contained in:
xtaci
2019-12-19 14:44:27 +08:00
parent 8a03eb1568
commit 4f88883837
2 changed files with 4 additions and 2 deletions
+1
View File
@@ -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
View File
@@ -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) {