mirror of
https://github.com/danbulant/discord.js
synced 2026-07-05 11:10:38 +00:00
Webpack build for branch 11.1-dev: 19d4d3bf2c
This commit is contained in:
parent
eb8af7b121
commit
e5922e386b
2 changed files with 5 additions and 2 deletions
|
|
@ -17700,13 +17700,16 @@ class WebSocketConnection extends EventEmitter {
|
||||||
* @param {Error} error Error that occurred
|
* @param {Error} error Error that occurred
|
||||||
*/
|
*/
|
||||||
onError(error) {
|
onError(error) {
|
||||||
|
if (error && error.message === 'uWs client connection error') {
|
||||||
|
this.reconnect();
|
||||||
|
return;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Emitted whenever the client's WebSocket encounters a connection error.
|
* Emitted whenever the client's WebSocket encounters a connection error.
|
||||||
* @event Client#error
|
* @event Client#error
|
||||||
* @param {Error} error The encountered error
|
* @param {Error} error The encountered error
|
||||||
*/
|
*/
|
||||||
this.client.emit(Constants.Events.ERROR, error);
|
this.client.emit(Constants.Events.ERROR, error);
|
||||||
if (error.message === 'uWs client connection error') this.reconnect();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
2
discord.11.1-dev.min.js
vendored
2
discord.11.1-dev.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue