@resolveio/server-lib 2.1.3 → 2.1.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.
@@ -326,7 +326,11 @@ var SubscriptionManager = /** @class */ (function () {
326
326
  active_subscription_collection_1.ActiveSubscriptions.deleteOne({ _id: sub._id }).exec();
327
327
  }
328
328
  else {
329
- sub.clients.splice(sub.clients.map(function (a) { return a.id_socket; }).indexOf(ws['id_socket']), 1);
329
+ for (var j = sub.clients.length - 1; j >= 0; j--) {
330
+ if (sub.clients[j].id_socket === ws['id_socket']) {
331
+ sub.clients.splice(j, 1);
332
+ }
333
+ }
330
334
  active_subscription_collection_1.ActiveSubscriptions.updateOne({ _id: sub._id }, { $set: { clients: sub.clients } }).exec();
331
335
  }
332
336
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resolveio/server-lib",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "scripts": {