mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-29 01:37:28 +01:00
ypaf fixes
This commit is contained in:
parent
fc05d3a626
commit
494a7ec1e4
1 changed files with 6 additions and 8 deletions
|
@ -39,13 +39,12 @@ def _get_con_pool():
|
||||||
if _CON_POOL is not None:
|
if _CON_POOL is not None:
|
||||||
return _CON_POOL
|
return _CON_POOL
|
||||||
|
|
||||||
_CON_POOL = urllib3.PoolManager(
|
_CON_POOL = urllib3.PoolManager(maxsize=CON_POOL_SIZE,
|
||||||
maxsize=CON_POOL_SIZE,
|
cert_reqs='CERT_REQUIRED',
|
||||||
cert_reqs='CERT_REQUIRED',
|
ca_certs=certifi.where(),
|
||||||
ca_certs=certifi.where(),
|
socket_options=HTTPConnection.default_socket_options + [
|
||||||
socket_options=HTTPConnection.default_socket_options + [
|
(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),
|
||||||
(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),
|
])
|
||||||
])
|
|
||||||
return _CON_POOL
|
return _CON_POOL
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,7 +59,6 @@ def stop_con_pool():
|
||||||
_CON_POOL = None
|
_CON_POOL = None
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _parse(json_data):
|
def _parse(json_data):
|
||||||
"""Try and parse the JSON returned from Telegram.
|
"""Try and parse the JSON returned from Telegram.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue