braid-http 1.0.6 → 1.0.7

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.
@@ -283,9 +283,10 @@ async function braid_fetch (url, params = {}) {
283
283
  let timeout = null
284
284
  on_heartbeat = () => {
285
285
  clearTimeout(timeout)
286
+ let wait_seconds = 1.2 * heartbeats + 3
286
287
  timeout = setTimeout(() => {
287
- on_error(new Error(`heartbeat not seen in ${(1.2 * heartbeats).toFixed(2)}s`))
288
- }, 1.2 * heartbeats * 1000)
288
+ on_error(new Error(`heartbeat not seen in ${wait_seconds.toFixed(2)}s`))
289
+ }, wait_seconds * 1000)
289
290
  }
290
291
  on_heartbeat()
291
292
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-http",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "An implementation of Braid-HTTP for Node.js and Browsers",
5
5
  "scripts": {
6
6
  "test": "node test/server.js"