diff --git a/src/invidious/connection/pool.cr b/src/invidious/connection/pool.cr index 66c4eaf4d..f7dc2d0a7 100644 --- a/src/invidious/connection/pool.cr +++ b/src/invidious/connection/pool.cr @@ -59,7 +59,12 @@ module Invidious::ConnectionPool http_client = pool.checkout - # Proxy needs to be reinstated every time we get a client from the pool + # When the HTTP::Client connection is closed, the automatic reconnection + # feature will create a new IO to connect to the server with + # + # This new TCP IO will be a direct connection to the server and will not go + # through the proxy. As such we'll need to reinitialize the proxy connection + http_client.proxy = make_configured_http_proxy_client() if CONFIG.http_proxy response = yield http_client