1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Merge pull request #1076 from Badiboy/master

Polling timeout fix
This commit is contained in:
Badiboy 2021-01-16 02:15:26 +03:00 committed by GitHub
commit a7587057bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -69,8 +69,11 @@ def _make_request(token, method_name, method='get', params=None, files=None):
if 'connect-timeout' in params:
connect_timeout = params.pop('connect-timeout') + 10
if 'long_polling_timeout' in params:
# For getUpdates: the only function with timeout on the BOT API side
# For getUpdates
# The only function with timeout on the BOT API side
params['timeout'] = params.pop('long_polling_timeout')
# Long polling hangs for given time. Read timeout should be greater that long_polling_timeout
read_timeout = max(params['timeout'] + 10, read_timeout)
result = None

View File

@ -1,3 +1,3 @@
# Versions should comply with PEP440.
# This line is parsed in setup.py:
__version__ = '3.7.5.u2'
__version__ = '3.7.5.u3'