Message193069
from multiprocessing/connection.py:
while 1:
try:
s.connect(address)
except socket.error, 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
According to the POSIX spec http://pubs.opengroup.org/onlinepubs/9699919799/
"If connect() fails, the state of the socket is unspecified. Conforming applications should close the file descriptor and create a new socket before attempting to reconnect."
On Mac OS X and other BSDs (but not Linux), attempting to connect() again throws EINVAL. As a result, the multiprocessing.connection.Client does not successfully retry, and instead throws
socket.error: [Errno 22] Invalid argument
after the first refused connection. I found that error message pretty confusing, and didn't realize that it effectively meant the connection was refused.
The change for issue #13215 removes the retry behavior entirely, so this bug does not appear in 3.3 and up. |
|
Date |
User |
Action |
Args |
2013-07-14 23:24:20 | Michael.Ballantyne | set | recipients:
+ Michael.Ballantyne, ronaldoussoren |
2013-07-14 23:24:20 | Michael.Ballantyne | set | messageid: <1373844260.31.0.599002604646.issue18455@psf.upfronthosting.co.za> |
2013-07-14 23:24:20 | Michael.Ballantyne | link | issue18455 messages |
2013-07-14 23:24:19 | Michael.Ballantyne | create | |
|