mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 03:22:47 +01:00
merge bitcoin#27418: Remove windows workaround in authproxy
This commit is contained in:
parent
a497df0339
commit
280988bee3
@ -39,7 +39,6 @@ from http import HTTPStatus
|
|||||||
import http.client
|
import http.client
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
|
||||||
import socket
|
import socket
|
||||||
import time
|
import time
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
@ -101,11 +100,6 @@ class AuthServiceProxy():
|
|||||||
'User-Agent': USER_AGENT,
|
'User-Agent': USER_AGENT,
|
||||||
'Authorization': self.__auth_header,
|
'Authorization': self.__auth_header,
|
||||||
'Content-type': 'application/json'}
|
'Content-type': 'application/json'}
|
||||||
if os.name == 'nt':
|
|
||||||
# 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:
|
try:
|
||||||
self.__conn.request(method, path, postdata, headers)
|
self.__conn.request(method, path, postdata, headers)
|
||||||
return self._get_response()
|
return self._get_response()
|
||||||
|
Loading…
Reference in New Issue
Block a user