Skip to content

Commit

Permalink
Update WebSocketShard.js
Browse files Browse the repository at this point in the history
  • Loading branch information
aiko-chan-ai committed Jan 4, 2023
1 parent c9d2d1b commit e00e92f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client/websocket/WebSocketShard.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ class WebSocketShard extends EventEmitter {
Version : ${client.options.ws.version}
Encoding : ${WebSocket.encoding}
Compression: ${zlib ? 'zlib-stream' : 'none'}
Proxy : ${client.options.ws.proxy || 'none'}`,
Proxy : ${client.options.proxy || 'none'}`,
);

this.status = this.status === Status.DISCONNECTED ? Status.RECONNECTING : Status.CONNECTING;
Expand All @@ -271,7 +271,7 @@ class WebSocketShard extends EventEmitter {
this.connectedAt = Date.now();

let args = { handshakeTimeout: 30_000 };
if (typeof client.options.proxy && client.options.proxy.length > 0) {
if (client.options.proxy.length > 0) {
args.agent = new proxy(client.options.proxy);
this.debug(`Using proxy ${client.options.proxy}`, args);
}
Expand Down

0 comments on commit e00e92f

Please sign in to comment.