mirror of https://github.com/Dreamacro/clash.git
Fix: close connection when response closed
This commit is contained in:
parent
f4c51cdb0e
commit
f2dbabeaa0
|
@ -36,7 +36,10 @@ func (t *Tunnel) handleHTTP(request *adapters.HTTPAdapter, proxy C.ProxyAdapter)
|
||||||
} else {
|
} else {
|
||||||
resp.Close = true
|
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()))
|
req, err = http.ReadRequest(bufio.NewReader(request.Conn()))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue