From 2edad86b2d130fa424ce63220dbf536c3efa9b55 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Fri, 13 May 2016 04:49:19 +0200 Subject: [PATCH] Fix interrupted HTTP RPC connection workaround for Python 3.5+ --- qa/rpc-tests/test_framework/authproxy.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qa/rpc-tests/test_framework/authproxy.py b/qa/rpc-tests/test_framework/authproxy.py index 111e6d76c..5df359c63 100644 --- a/qa/rpc-tests/test_framework/authproxy.py +++ b/qa/rpc-tests/test_framework/authproxy.py @@ -125,6 +125,11 @@ class AuthServiceProxy(object): return self._get_response() else: 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): AuthServiceProxy.__id_count += 1