mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-29 13:27:44 +00:00
After polling error, keep trying
This commit is contained in:
parent
a17755eb0d
commit
8a0a594177
@ -111,6 +111,10 @@ TelegramBot.prototype._polling = function (timeout) {
|
|||||||
this.getUpdates(timeout).then(function (data) {
|
this.getUpdates(timeout).then(function (data) {
|
||||||
self._processUpdates(data);
|
self._processUpdates(data);
|
||||||
self._polling(timeout);
|
self._polling(timeout);
|
||||||
|
}).catch(function (err) {
|
||||||
|
// console.error(err);
|
||||||
|
// Wait for 2 seconds before retry
|
||||||
|
setTimeout(self._polling.bind(self), 2000, timeout);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user