mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
Remove old uws-specific code (0.11.1 has the good stuff)
This commit is contained in:
@@ -79,16 +79,11 @@ class WebSocketManager extends EventEmitter {
|
||||
this.normalReady = false;
|
||||
if (this.status !== Constants.Status.RECONNECTING) this.status = Constants.Status.CONNECTING;
|
||||
this.ws = new WebSocket(gateway);
|
||||
if (browser) {
|
||||
this.ws.binaryType = 'arraybuffer';
|
||||
this.ws.onopen = () => this.eventOpen();
|
||||
this.ws.onerror = (e) => this.eventError(e);
|
||||
} else {
|
||||
this.ws.on('open', this.eventOpen.bind(this));
|
||||
this.ws.on('error', this.eventError.bind(this));
|
||||
}
|
||||
this.ws.onclose = (d) => this.eventClose(d);
|
||||
this.ws.onmessage = (e) => this.eventMessage(e);
|
||||
if (browser) this.ws.binaryType = 'arraybuffer';
|
||||
this.ws.onopen = this.eventOpen.bind(this);
|
||||
this.ws.onmessage = this.eventMessage.bind(this);
|
||||
this.ws.onclose = this.eventClose.bind(this);
|
||||
this.ws.onerror = this.eventError.bind(this);
|
||||
this._queue = [];
|
||||
this._remaining = 3;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user