@graffy/server 0.17.8-alpha.2 → 0.17.8

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.
Files changed (3) hide show
  1. package/index.cjs +4 -1
  2. package/index.mjs +4 -1
  3. package/package.json +4 -4
package/index.cjs CHANGED
@@ -192,7 +192,10 @@ function server(store, { auth, allowedOptions = [] } = {}) {
192
192
  });
193
193
  setInterval(function ping() {
194
194
  wss.clients.forEach(function each(ws2) {
195
- if (ws2.pingPending) return ws2.terminate();
195
+ if (ws2.pingPending) {
196
+ ws2.terminate();
197
+ return;
198
+ }
196
199
  ws2.pingPending = true;
197
200
  ws2.send(JSON.stringify([":ping", Date.now()]));
198
201
  });
package/index.mjs CHANGED
@@ -190,7 +190,10 @@ function server(store, { auth, allowedOptions = [] } = {}) {
190
190
  });
191
191
  setInterval(function ping() {
192
192
  wss.clients.forEach(function each(ws) {
193
- if (ws.pingPending) return ws.terminate();
193
+ if (ws.pingPending) {
194
+ ws.terminate();
195
+ return;
196
+ }
194
197
  ws.pingPending = true;
195
198
  ws.send(JSON.stringify([":ping", Date.now()]));
196
199
  });
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graffy/server",
3
3
  "description": "Node.js library for building an API for a Graffy store.",
4
4
  "author": "aravind (https://github.com/aravindet)",
5
- "version": "0.17.8-alpha.2",
5
+ "version": "0.17.8",
6
6
  "main": "./index.cjs",
7
7
  "exports": {
8
8
  "import": "./index.mjs",
@@ -16,8 +16,8 @@
16
16
  },
17
17
  "license": "Apache-2.0",
18
18
  "dependencies": {
19
- "@graffy/common": "0.17.8-alpha.2",
20
- "debug": "^4.4.1",
21
- "ws": "^8.18.2"
19
+ "@graffy/common": "0.17.8",
20
+ "debug": "^4.4.3",
21
+ "ws": "^8.19.0"
22
22
  }
23
23
  }