This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ssl | |
import requests | |
from requests.adapters import HTTPAdapter | |
from requests.packages.urllib3.poolmanager import PoolManager | |
class TLSv1Adapter(HTTPAdapter): | |
""""Transport adapter" that allows us to use TLSv1.""" | |
def init_poolmanager(self, connections, maxsize, block=False): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Some requests receive a Response but keep the socket in | |
CLOSE_WAIT state until process is killed . | |
Some requests raise ConnectionError after some time and | |
seem to block others unprocessed spawned requests until | |
all ConnectionError are not raised . | |
(all http connection pool slots are busy ?) | |
""" |