diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-07-24 02:51:49 +0000 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-07-24 02:51:49 +0000 |
commit | 8b0d84e3d56f185e70b2f862d8f5bc33d1da92b3 (patch) | |
tree | a5be7363a7f9c64c2a658503e17fbd5ac367810f /Lib/xmlrpclib.py | |
parent | 2c6aee9096c7502ad2ec1c522f4b0e9be0a6569d (diff) | |
download | cpython-git-8b0d84e3d56f185e70b2f862d8f5bc33d1da92b3.tar.gz |
Backport of 83120 (#9032)
XML-RPC client: Transport.request() retries on EPIPE error
The EPIPE error occurs when the server closes the socket and the client sends a
"big" XML-RPC request (I don't know exactly the size threshold).
request() just have to ignore the error because single_request() closes the
socket on error, and so the next call to single_request() will open a new
socket.
Remove also a comment in the HTTP client because it's now wrong: see r70643 and
issue #5542.
Diffstat (limited to 'Lib/xmlrpclib.py')
-rw-r--r-- | Lib/xmlrpclib.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/xmlrpclib.py b/Lib/xmlrpclib.py index c7971cc4cf..b6aed62e3b 100644 --- a/Lib/xmlrpclib.py +++ b/Lib/xmlrpclib.py @@ -1263,7 +1263,7 @@ class Transport: try: return self.single_request(host, handler, request_body, verbose) except socket.error, e: - if i or e.errno not in (errno.ECONNRESET, errno.ECONNABORTED): + if i or e.errno not in (errno.ECONNRESET, errno.ECONNABORTED, errno.EPIPE): raise except httplib.BadStatusLine: #close after we sent request if i: |