From 3a385161892fc3b93e460b32920b5034c302d651 Mon Sep 17 00:00:00 2001 From: k1ker <31039339+k1ker@users.noreply.github.com> Date: Thu, 24 Jan 2019 07:17:26 +0300 Subject: [PATCH] Update index.js --- lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index b5ccf122..46f76783 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1703,7 +1703,7 @@ function getGateway(client, token) { return APIRequest('get', Endpoints.GATEWAY, function (err, res) { if (err || !goodResponse(res)) { client._connecting = false; - return client.emit("disconnect", "Error GETing gateway:\n" + stringifyError(res), 0); + return client.emit("disconnect", "Error GETing gateway:\n" + stringifyError(res), res ? res.statusCode : 0); } return startConnection(client, (res.body.url + "/?encoding=json&v=" + GATEWAY_VERSION)); });