2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-28 12:57:38 +00:00

src/polling: Fix bug #276

Bug:

  With environment variable, `NODE_ENV`, is set to 'development',
  'request-promise' emits the process warning:

  Warning: a promise was created in a handler, but was not returned from
  it

  > If you know what you're doing and don't want to silence all
  > warnings, you can create runaway promises without causing this
  > warning by returning e.g. null:
  >
  > — http://bluebirdjs.com/docs/warning-explanations.html#warning-a-promise-was-created-in-a-handler-but-was-not-returned-from-it

  We believe we know what we are doing.

References:

  * Issue #276: https://github.com/yagop/node-telegram-bot-api/issues/276
This commit is contained in:
GochoMugo 2017-02-08 11:33:08 +03:00
parent 14f37c7181
commit 3221d647cc
No known key found for this signature in database
GPG Key ID: 7B6A01CB57AA39E4

View File

@ -104,6 +104,7 @@ class TelegramBotPolling {
debug('updated offset: %s', this._offset);
this.callback(update);
});
return null;
})
.catch(err => {
debug('polling error: %s', err.message);