mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-31 09:14:56 +00:00
test: Avoid ConnectionResetErrors during RPC tests
This is necessary on FreeBSD and MacOSX, at least. See https://github.com/bitcoin/bitcoin/pull/8834#issuecomment-250450213 Github-Pull: #8839 Rebased-From: 1d28faf9e94fcf240ece7336d61ec297b064bc37
This commit is contained in:
parent
eb18cc1272
commit
31ab2f862a
@ -126,8 +126,9 @@ class AuthServiceProxy(object):
|
|||||||
return self._get_response()
|
return self._get_response()
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
except BrokenPipeError:
|
except (BrokenPipeError,ConnectionResetError):
|
||||||
# Python 3.5+ raises this instead of BadStatusLine when the connection was reset
|
# Python 3.5+ raises BrokenPipeError instead of BadStatusLine when the connection was reset
|
||||||
|
# ConnectionResetError happens on FreeBSD with Python 3.4
|
||||||
self.__conn.close()
|
self.__conn.close()
|
||||||
self.__conn.request(method, path, postdata, headers)
|
self.__conn.request(method, path, postdata, headers)
|
||||||
return self._get_response()
|
return self._get_response()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user