mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-01-08 19:34:12 +01:00
use HTTPSConnectionPool instead of PoolManager
This commit is contained in:
parent
41f6591ac6
commit
74283bd414
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue