hume 0.10.4-beta.3 → 0.10.4-beta.4
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/core/websocket/events.js
CHANGED
package/core/websocket/ws.js
CHANGED
|
@@ -166,6 +166,7 @@ class ReconnectingWebSocket {
|
|
|
166
166
|
this._shouldReconnect = false;
|
|
167
167
|
this._debug("Reconnection stopped: Received close code 1000 (intentional server close).");
|
|
168
168
|
}
|
|
169
|
+
adaptedEvent.willReconnect = this._shouldReconnect;
|
|
169
170
|
// Dispatch event to listeners
|
|
170
171
|
if (this.onclose)
|
|
171
172
|
this.onclose(adaptedEvent);
|
|
@@ -414,6 +415,7 @@ class ReconnectingWebSocket {
|
|
|
414
415
|
this._listeners.error.forEach((listener) => this._callEventListener(errorEvent, listener));
|
|
415
416
|
// Dispatch close event
|
|
416
417
|
const closeEvent = new Events.CloseEvent(1000, closeReason, this);
|
|
418
|
+
closeEvent.willReconnect = false;
|
|
417
419
|
if (this.onclose)
|
|
418
420
|
this.onclose(closeEvent);
|
|
419
421
|
this._listeners.close.forEach((listener) => this._callEventListener(closeEvent, listener));
|
|
@@ -166,6 +166,7 @@ class ReconnectingWebSocket {
|
|
|
166
166
|
this._shouldReconnect = false;
|
|
167
167
|
this._debug("Reconnection stopped: Received close code 1000 (intentional server close).");
|
|
168
168
|
}
|
|
169
|
+
adaptedEvent.willReconnect = this._shouldReconnect;
|
|
169
170
|
// Dispatch event to listeners
|
|
170
171
|
if (this.onclose)
|
|
171
172
|
this.onclose(adaptedEvent);
|
|
@@ -414,6 +415,7 @@ class ReconnectingWebSocket {
|
|
|
414
415
|
this._listeners.error.forEach((listener) => this._callEventListener(errorEvent, listener));
|
|
415
416
|
// Dispatch close event
|
|
416
417
|
const closeEvent = new Events.CloseEvent(1000, closeReason, this);
|
|
418
|
+
closeEvent.willReconnect = false;
|
|
417
419
|
if (this.onclose)
|
|
418
420
|
this.onclose(closeEvent);
|
|
419
421
|
this._listeners.close.forEach((listener) => this._callEventListener(closeEvent, listener));
|