We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc77c84 commit fc05d3aCopy full SHA for fc05d3a
telegram/utils/request.py
@@ -29,7 +29,7 @@
29
from telegram.error import Unauthorized, NetworkError, TimedOut, BadRequest
30
31
_CON_POOL = None
32
-""":type: urllib3.HTTPSConnectionPool"""
+""":type: urllib3.PoolManager"""
33
CON_POOL_SIZE = 1
34
35
@@ -39,8 +39,7 @@ def _get_con_pool():
39
if _CON_POOL is not None:
40
return _CON_POOL
41
42
- _CON_POOL = urllib3.HTTPSConnectionPool(
43
- host='api.telegram.org',
+ _CON_POOL = urllib3.PoolManager(
44
maxsize=CON_POOL_SIZE,
45
cert_reqs='CERT_REQUIRED',
46
ca_certs=certifi.where(),
@@ -57,7 +56,7 @@ def is_con_pool_initialized():
57
56
def stop_con_pool():
58
global _CON_POOL
59
60
- _CON_POOL.close()
+ _CON_POOL.clear()
61
62
63
0 commit comments