@sandbox-engine/sdk 0.2.3 → 0.2.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/dist/index.js +4 -0
- package/dist/index.mjs +4 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -53,6 +53,10 @@ var WsEmitterAdapter = class extends import_node_events.EventEmitter {
|
|
|
53
53
|
ws.addEventListener("error", (e) => this.emit("error", e));
|
|
54
54
|
ws.addEventListener("close", () => this.emit("close"));
|
|
55
55
|
ws.addEventListener("open", () => this.emit("open"));
|
|
56
|
+
const state = ws.readyState;
|
|
57
|
+
if (state === 1) {
|
|
58
|
+
queueMicrotask(() => this.emit("open"));
|
|
59
|
+
}
|
|
56
60
|
}
|
|
57
61
|
ws;
|
|
58
62
|
OPEN = 1;
|
package/dist/index.mjs
CHANGED
|
@@ -12,6 +12,10 @@ var WsEmitterAdapter = class extends EventEmitter {
|
|
|
12
12
|
ws.addEventListener("error", (e) => this.emit("error", e));
|
|
13
13
|
ws.addEventListener("close", () => this.emit("close"));
|
|
14
14
|
ws.addEventListener("open", () => this.emit("open"));
|
|
15
|
+
const state = ws.readyState;
|
|
16
|
+
if (state === 1) {
|
|
17
|
+
queueMicrotask(() => this.emit("open"));
|
|
18
|
+
}
|
|
15
19
|
}
|
|
16
20
|
ws;
|
|
17
21
|
OPEN = 1;
|