diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-02-25 11:53:40 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-02-25 11:53:40 (GMT) |
commit | eae3336e425a718d6c17ee1247236a62080bac7f (patch) | |
tree | 144b7ec9f5b2a289b23a5f5c175e13947182a772 /Lib/xmlrpc | |
parent | f828218d652fe8120d88cfefa52df5c2039cdf92 (diff) | |
download | cpython-eae3336e425a718d6c17ee1247236a62080bac7f.zip cpython-eae3336e425a718d6c17ee1247236a62080bac7f.tar.gz cpython-eae3336e425a718d6c17ee1247236a62080bac7f.tar.bz2 |
Issue #26402: Fix XML-RPC client retrying after server disconnection
This is a regression introduced in 3.5 by revision eba80326ba53. Fix by Jelte
Fennema, test case by me.
Diffstat (limited to 'Lib/xmlrpc')
-rw-r--r-- | Lib/xmlrpc/client.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/xmlrpc/client.py b/Lib/xmlrpc/client.py index bf42835..e7daa07 100644 --- a/Lib/xmlrpc/client.py +++ b/Lib/xmlrpc/client.py @@ -1129,13 +1129,13 @@ class Transport: for i in (0, 1): try: return self.single_request(host, handler, request_body, verbose) + except http.client.RemoteDisconnected: + if i: + raise except OSError as e: if i or e.errno not in (errno.ECONNRESET, errno.ECONNABORTED, errno.EPIPE): raise - except http.client.RemoteDisconnected: - if i: - raise def single_request(self, host, handler, request_body, verbose=False): # issue XML-RPC request |