mirror of
https://github.com/ehang-io/nps.git
synced 2025-09-02 11:56:53 +00:00
http bug
This commit is contained in:
@@ -163,14 +163,15 @@ func (s *TRPClient) handleChan(src net.Conn) {
|
||||
logs.Warn("connect to %s error %s", lk.Host, err.Error())
|
||||
src.Close()
|
||||
} else {
|
||||
srcConn := conn.GetConn(src, lk.Crypt, lk.Compress, nil, false)
|
||||
go func() {
|
||||
common.CopyBuffer(src, targetConn)
|
||||
src.Close()
|
||||
common.CopyBuffer(srcConn, targetConn)
|
||||
srcConn.Close()
|
||||
targetConn.Close()
|
||||
}()
|
||||
for {
|
||||
if r, err := http.ReadRequest(bufio.NewReader(src)); err != nil {
|
||||
src.Close()
|
||||
if r, err := http.ReadRequest(bufio.NewReader(srcConn)); err != nil {
|
||||
srcConn.Close()
|
||||
targetConn.Close()
|
||||
break
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user