From 3221d647ccdbcc58562faceabf94ee4c6dae6966 Mon Sep 17 00:00:00 2001 From: GochoMugo Date: Wed, 8 Feb 2017 11:33:08 +0300 Subject: [PATCH] src/polling: Fix bug #276 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/telegramPolling.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/telegramPolling.js b/src/telegramPolling.js index 91d6b45..365c168 100644 --- a/src/telegramPolling.js +++ b/src/telegramPolling.js @@ -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);