diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-07-24 02:24:55 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-07-24 02:24:55 (GMT) |
commit | 756f547b9a4b93c4eab1bb05dbf41c33e5924554 (patch) | |
tree | d708b3e204c6ea2c1d66cd61736cea2ea451f972 /Lib/xmlrpc | |
parent | eccc5facd34609c029efce6fd2cd302f73e50566 (diff) | |
download | cpython-756f547b9a4b93c4eab1bb05dbf41c33e5924554.zip cpython-756f547b9a4b93c4eab1bb05dbf41c33e5924554.tar.gz cpython-756f547b9a4b93c4eab1bb05dbf41c33e5924554.tar.bz2 |
#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/xmlrpc')
-rw-r--r-- | Lib/xmlrpc/client.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/xmlrpc/client.py b/Lib/xmlrpc/client.py index a72908c..d9c43c2 100644 --- a/Lib/xmlrpc/client.py +++ b/Lib/xmlrpc/client.py @@ -1135,7 +1135,7 @@ class Transport: try: return self.single_request(host, handler, request_body, verbose) except socket.error as 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 http.client.BadStatusLine: #close after we sent request if i: |