mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 17:43:30 +01: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:
@@ -153,7 +153,9 @@ class Client {
|
||||
if (err) {
|
||||
self.state = 4; //set state to disconnected
|
||||
self.trigger("disconnected");
|
||||
self.websocket.close();
|
||||
if(self.websocket){
|
||||
self.websocket.close();
|
||||
}
|
||||
callback(err);
|
||||
reject(err);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user