use HTTPSConnectionPool instead of PoolManager

This commit is contained in:
Jannes Höke 2016-05-30 17:12:50 +02:00
parent 41f6591ac6
commit 74283bd414

View file

@ -35,9 +35,10 @@ def _get_con_pool():
return _CON_POOL
global _CON_POOL
_CON_POOL = urllib3.PoolManager(CON_POOL_SIZE,
cert_reqs='CERT_REQUIRED',
ca_certs=certifi.where())
_CON_POOL = urllib3.HTTPSConnectionPool(host='api.telegram.org',
maxsize=CON_POOL_SIZE,
cert_reqs='CERT_REQUIRED',
ca_certs=certifi.where())
return _CON_POOL