Skip to content

Commit ae5575b

Browse files
author
MarcoFalke
committed
Merge #8139: Fix interrupted HTTP RPC connection workaround for Python 3.5+
f45f51e Fix interrupted HTTP RPC connection workaround for Python 3.5+ (Pieter Wuille)
2 parents a82f033 + f45f51e commit ae5575b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

qa/rpc-tests/test_framework/authproxy.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ def _request(self, method, path, postdata):
124124
return self._get_response()
125125
else:
126126
raise
127+
except BrokenPipeError:
128+
# Python 3.5+ raises this instead of BadStatusLine when the connection was reset
129+
self.__conn.close()
130+
self.__conn.request(method, path, postdata, headers)
131+
return self._get_response()
127132

128133
def __call__(self, *args):
129134
AuthServiceProxy.__id_count += 1

0 commit comments

Comments
 (0)