@dnax/core 0.16.3 → 0.16.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.
@@ -75,9 +75,9 @@ function webSocketServer(server: Server): WebSocketHandler {
75
75
  let id = v4();
76
76
  ws.id = id;
77
77
  wsClients.set(id, ws);
78
+
78
79
  // set Id to client and emit it
79
80
  ws.send(JSON.stringify({ type: "setId", id: id }));
80
-
81
81
  // run all listenners event for connection
82
82
  let evs = wsEvents.filter(
83
83
  (e) => e.type == "on" && e?.event == "connection"
@@ -113,13 +113,15 @@ function webSocketServer(server: Server): WebSocketHandler {
113
113
  );
114
114
  }
115
115
  });
116
+
117
+ wsClients?.delete(ws.id);
116
118
  // console.log("close", code, reason);
117
119
  // console.log(ws.id);
118
120
  },
119
121
  message: (ws, message: any) => {
120
122
  try {
121
123
  let options: optionsIo = JSON.parse(message);
122
- //console.log(options);
124
+
123
125
  // find all listeners : On
124
126
  let evs = wsEvents.filter(
125
127
  (e) => e.event == options?.event && e?.type == "on"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.16.3",
3
+ "version": "0.16.4",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {