mirror of
https://github.com/danbulant/discord.js
synced 2026-07-08 12:40:50 +00:00
3.1.6, fixing login bug
Fixed bug where the client attempts to close the websocket if there is an error whilst it is null
This commit is contained in:
parent
3ccbd391e7
commit
df744e7d54
2 changed files with 4 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "discord.js",
|
"name": "discord.js",
|
||||||
"version": "3.1.5",
|
"version": "3.1.6",
|
||||||
"description": "A way to interface with the Discord API",
|
"description": "A way to interface with the Discord API",
|
||||||
"main": "./lib/index.js",
|
"main": "./lib/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,9 @@ class Client {
|
||||||
if (err) {
|
if (err) {
|
||||||
self.state = 4; //set state to disconnected
|
self.state = 4; //set state to disconnected
|
||||||
self.trigger("disconnected");
|
self.trigger("disconnected");
|
||||||
self.websocket.close();
|
if(self.websocket){
|
||||||
|
self.websocket.close();
|
||||||
|
}
|
||||||
callback(err);
|
callback(err);
|
||||||
reject(err);
|
reject(err);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue