summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorCharles-François Natali <neologix@free.fr>2011-11-19 08:59:43 (GMT)
committerCharles-François Natali <neologix@free.fr>2011-11-19 08:59:43 (GMT)
commite6eabd43458c041ceae418c3806dcfcc30b5ed2e (patch)
tree07892f08bf3e69840dd793d37ad65dfdbe6e4e01 /Lib
parente53245696539dc2d1b128dcdcb25d803fcb971bc (diff)
downloadcpython-e6eabd43458c041ceae418c3806dcfcc30b5ed2e.zip
cpython-e6eabd43458c041ceae418c3806dcfcc30b5ed2e.tar.gz
cpython-e6eabd43458c041ceae418c3806dcfcc30b5ed2e.tar.bz2
Issue #13215: multiprocessing.Connection: don't hammer the remote end with
retries in case of ECONNREFUSED.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/multiprocessing/connection.py16
1 files changed, 1 insertions, 15 deletions
diff --git a/Lib/multiprocessing/connection.py b/Lib/multiprocessing/connection.py
index 0c96958..c6c6113 100644
--- a/Lib/multiprocessing/connection.py
+++ b/Lib/multiprocessing/connection.py
@@ -608,21 +608,7 @@ def SocketClient(address):
'''
family = address_type(address)
with socket.socket( getattr(socket, family) ) as s:
- t = _init_timeout()
-
- while 1:
- try:
- s.connect(address)
- except socket.error as e:
- if e.args[0] != errno.ECONNREFUSED or _check_timeout(t):
- debug('failed to connect to address %s', address)
- raise
- time.sleep(0.01)
- else:
- break
- else:
- raise
-
+ s.connect(address)
fd = duplicate(s.fileno())
conn = Connection(fd)
return conn