Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13115682
D7515.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D7515.diff
View Options
diff --git a/test/functional/test_framework/authproxy.py b/test/functional/test_framework/authproxy.py
--- a/test/functional/test_framework/authproxy.py
+++ b/test/functional/test_framework/authproxy.py
@@ -107,23 +107,27 @@
# Windows somehow does not like to re-use connections
# TODO: Find out why the connection would disconnect occasionally
# and make it reusable on Windows
+ # Avoid "ConnectionAbortedError: [WinError 10053] An established
+ # connection was aborted by the software in your host machine"
self._set_conn()
try:
self.__conn.request(method, path, postdata, headers)
return self._get_response()
- except http.client.BadStatusLine as e:
- if e.line == "''": # if connection was closed, try again
+ except (BrokenPipeError, ConnectionResetError):
+ # Python 3.5+ raises BrokenPipeError when the connection was reset
+ # ConnectionResetError happens on FreeBSD
+ self.__conn.close()
+ self.__conn.request(method, path, postdata, headers)
+ return self._get_response()
+ except OSError as e:
+ retry = (
+ '[WinError 10053] An established connection was aborted by the software in your host machine' in str(e))
+ if retry:
self.__conn.close()
self.__conn.request(method, path, postdata, headers)
return self._get_response()
else:
raise
- except (BrokenPipeError, ConnectionResetError):
- # 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.request(method, path, postdata, headers)
- return self._get_response()
def get_request(self, *args, **argsn):
AuthServiceProxy.__id_count += 1
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 1, 11:43 (6 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5187678
Default Alt Text
D7515.diff (1 KB)
Attached To
D7515: test: Try once more when RPC connection fails on Windows
Event Timeline
Log In to Comment