From eece1686c575edb05a57872de8c4fcf80d780e78 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Wed, 17 Jun 2020 09:23:58 -0700 Subject: [PATCH] composer-cli: Disable retry counter on connection timeout urllib3 has a retry system that send the request again when the connection fails, times out, is redircted, etc. This turns off retries, which aren't very useful anyway. Resolves: rhbz#1847490 --- src/composer/unix_socket.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/composer/unix_socket.py b/src/composer/unix_socket.py index 5b597547..f7a94609 100644 --- a/src/composer/unix_socket.py +++ b/src/composer/unix_socket.py @@ -53,8 +53,10 @@ class UnixHTTPConnectionPool(urllib3.connectionpool.HTTPConnectionPool): :param socket_path: The path to the Unix domain socket :param timeout: Number of seconds to timeout the connection + + NOTE: retries are disabled for these connections, they are never useful """ - super(UnixHTTPConnectionPool, self).__init__('localhost', timeout=timeout) + super(UnixHTTPConnectionPool, self).__init__('localhost', timeout=timeout, retries=False) self.socket_path = socket_path def _new_conn(self):