Skip to content

Commit

Permalink
src/polling: Fix bug #276
Browse files Browse the repository at this point in the history
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: yagop/node-telegram-bot-api#276
  • Loading branch information
passion-27 committed Feb 8, 2017
1 parent d6409dd commit 0488f4a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/telegramPolling.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0488f4a

Please sign in to comment.