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. Related: rhbz#1844649
This commit is contained in:
parent
800fc3b18b
commit
952b34dbca
@ -53,8 +53,10 @@ class UnixHTTPConnectionPool(urllib3.connectionpool.HTTPConnectionPool):
|
|||||||
|
|
||||||
:param socket_path: The path to the Unix domain socket
|
:param socket_path: The path to the Unix domain socket
|
||||||
:param timeout: Number of seconds to timeout the connection
|
: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
|
self.socket_path = socket_path
|
||||||
|
|
||||||
def _new_conn(self):
|
def _new_conn(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user