From af51e591b45e7063bec37462f9b43c6fa2acc6c9 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Fri, 3 Jun 2016 08:52:45 +0200 Subject: [PATCH] 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) --- 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 3bc84bc5c1f19..d095a56ce75e3 100644 --- a/qa/rpc-tests/test_framework/authproxy.py +++ b/qa/rpc-tests/test_framework/authproxy.py @@ -126,6 +126,11 @@ def _request(self, method, path, postdata): 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