mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-27 03:33:27 -03:00
Fix interrupted HTTP RPC connection workaround for Python 3.5+
This commit is contained in:
parent
ec45cc5e27
commit
f45f51e3ae
1 changed files with 5 additions and 0 deletions
|
@ -124,6 +124,11 @@ class AuthServiceProxy(object):
|
||||||
return self._get_response()
|
return self._get_response()
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
except BrokenPipeError:
|
||||||
|
# Python 3.5+ raises this instead of BadStatusLine when the connection was reset
|
||||||
|
self.__conn.close()
|
||||||
|
self.__conn.request(method, path, postdata, headers)
|
||||||
|
return self._get_response()
|
||||||
|
|
||||||
def __call__(self, *args):
|
def __call__(self, *args):
|
||||||
AuthServiceProxy.__id_count += 1
|
AuthServiceProxy.__id_count += 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue