From bdcd9afc1fa3ca161377d4a5056932ad353b3585 Mon Sep 17 00:00:00 2001 From: syeopite Date: Thu, 14 Nov 2024 20:05:53 -0800 Subject: [PATCH] Update comment on reiniting proxy of pooled client --- src/invidious/connection/pool.cr | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/invidious/connection/pool.cr b/src/invidious/connection/pool.cr index 66c4eaf4..f7dc2d0a 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