diff --git a/telebot/apihelper.py b/telebot/apihelper.py index 41b647c..98ed5eb 100644 --- a/telebot/apihelper.py +++ b/telebot/apihelper.py @@ -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 diff --git a/telebot/version.py b/telebot/version.py index 60813d8..308e7a3 100644 --- a/telebot/version.py +++ b/telebot/version.py @@ -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'