@arcblock/ws 1.32.8 → 1.32.10

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.
@@ -275,6 +275,11 @@ var WsServer = class extends EventEmitter {
275
275
  this._detachBroadcastListener();
276
276
  server.off("upgrade", onUpgrade);
277
277
  server.closeAllConnections?.();
278
+ for (const wsSocket of Array.from(this.connections)) try {
279
+ wsSocket.close(1001, "Server shutting down");
280
+ } catch {
281
+ wsSocket.terminate?.();
282
+ }
278
283
  return origClose(cb);
279
284
  });
280
285
  return this;
@@ -280,6 +280,11 @@ var WsServer = class extends node_events.default {
280
280
  this._detachBroadcastListener();
281
281
  server.off("upgrade", onUpgrade);
282
282
  server.closeAllConnections?.();
283
+ for (const wsSocket of Array.from(this.connections)) try {
284
+ wsSocket.close(1001, "Server shutting down");
285
+ } catch {
286
+ wsSocket.terminate?.();
287
+ }
283
288
  return origClose(cb);
284
289
  });
285
290
  return this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ws",
3
- "version": "1.32.8",
3
+ "version": "1.32.10",
4
4
  "description": "OCAP Chain websocket server and client",
5
5
  "keywords": [
6
6
  "websocket"
@@ -75,7 +75,7 @@
75
75
  "url": "https://github.com/ArcBlock/blockchain/issues"
76
76
  },
77
77
  "dependencies": {
78
- "@arcblock/event-hub": "1.32.8",
78
+ "@arcblock/event-hub": "1.32.10",
79
79
  "debug": "^4.4.3",
80
80
  "eventemitter3": "^4.0.7",
81
81
  "lodash": "^4.17.23",