Fix: close connection when response closed
This commit is contained in:
parent
f4c51cdb0e
commit
f2dbabeaa0
1 changed files with 4 additions and 1 deletions
|
@ -36,7 +36,10 @@ func (t *Tunnel) handleHTTP(request *adapters.HTTPAdapter, proxy C.ProxyAdapter)
|
|||
} else {
|
||||
resp.Close = true
|
||||
}
|
||||
resp.Write(request.Conn())
|
||||
err = resp.Write(request.Conn())
|
||||
if err != nil || resp.Close {
|
||||
break
|
||||
}
|
||||
|
||||
req, err = http.ReadRequest(bufio.NewReader(request.Conn()))
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue