connection leak in via loop detection
Choraden opened this issue · 0 comments
Choraden commented
Steps to Reproduce the Problem
- run forwarder
go run ./cmd/forwarder run --log-http short-url --proxy-localhost allow
- make a loop request
curl -x localhost:3128 localhost:3128
forwarder proxy error for host "localhost:3128"
via: detected request loop, header contains 1.1 forwarder-99abeebda2f5188c8436
- close forwarder
2024/02/09 15:41:49.435234 [proxy] [INFO] closing down proxy
2024/02/09 15:41:49.435256 [proxy] [INFO] waiting for connections to close
It hangs waiting for connections to close...
Full log
2024/02/09 15:42:53.446295 [INFO] Forwarder Unknown (Unknown)
2024/02/09 15:42:53.446317 [INFO] configuration
log-http=short-url
proxy-localhost=allow
2024/02/09 15:42:53.446388 [proxy] [INFO] no upstream proxy specified
2024/02/09 15:42:53.446389 [proxy] [INFO] localhost proxying mode=allow
2024/02/09 15:42:53.446682 [proxy] [INFO] PROXY server listen address=[::]:3128 protocol=http
2024/02/09 15:42:53.448299 [api] [INFO] HTTP server listen address=127.0.0.1:10000 protocol=http
2024/02/09 15:42:56.973851 [proxy] [INFO] [2-feda1010] GET http://localhost:3128/ status=400 duration=104.917µs
2024/02/09 15:42:56.974253 [proxy] [INFO] [1-fe96ae10] GET http://localhost:3128/ status=400 duration=4.926292ms
^C2024/02/09 15:43:05.925492 [proxy] [INFO] closing down proxy
2024/02/09 15:43:05.925534 [proxy] [INFO] waiting for connections to close
2024/02/09 15:44:26.975553 [proxy] [INFO] all connections closed
Connection got closed 90s
after the request completed.