Skip to content

Commit

Permalink
Polling timeout fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Badiboy committed Jan 15, 2021
1 parent 8203fa5 commit e9ba2fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion telebot/apihelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion telebot/version.py
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit e9ba2fd

Please sign in to comment.