novaapp-sdk 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -2
- package/dist/index.mjs +8 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -429,8 +429,14 @@ var NovaClient = class extends import_node_events.EventEmitter {
|
|
|
429
429
|
* Disconnect from the gateway and clean up.
|
|
430
430
|
*/
|
|
431
431
|
disconnect() {
|
|
432
|
-
this.socket
|
|
433
|
-
|
|
432
|
+
if (this.socket) {
|
|
433
|
+
try {
|
|
434
|
+
this.socket.io.reconnection(false);
|
|
435
|
+
} catch {
|
|
436
|
+
}
|
|
437
|
+
this.socket.disconnect();
|
|
438
|
+
this.socket = null;
|
|
439
|
+
}
|
|
434
440
|
}
|
|
435
441
|
/**
|
|
436
442
|
* Send a message via the WebSocket gateway (lower latency than HTTP).
|
package/dist/index.mjs
CHANGED
|
@@ -397,8 +397,14 @@ var NovaClient = class extends EventEmitter {
|
|
|
397
397
|
* Disconnect from the gateway and clean up.
|
|
398
398
|
*/
|
|
399
399
|
disconnect() {
|
|
400
|
-
this.socket
|
|
401
|
-
|
|
400
|
+
if (this.socket) {
|
|
401
|
+
try {
|
|
402
|
+
this.socket.io.reconnection(false);
|
|
403
|
+
} catch {
|
|
404
|
+
}
|
|
405
|
+
this.socket.disconnect();
|
|
406
|
+
this.socket = null;
|
|
407
|
+
}
|
|
402
408
|
}
|
|
403
409
|
/**
|
|
404
410
|
* Send a message via the WebSocket gateway (lower latency than HTTP).
|