braid-http 1.3.6 → 1.3.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.
@@ -234,7 +234,6 @@ async function braid_fetch (url, params = {}) {
234
234
  )
235
235
 
236
236
  var waitTime = 10
237
- var waitedTime = 0
238
237
  var res = null
239
238
  var subscription_cb = null
240
239
  var subscription_error = null
@@ -252,15 +251,8 @@ async function braid_fetch (url, params = {}) {
252
251
 
253
252
  underlying_aborter.abort()
254
253
 
255
- if (params.retry.timeout && waitedTime + waitTime > params.retry.timeout) {
256
- e = new Error('Timeout Error')
257
- subscription_error?.(e)
258
- return fail(e)
259
- }
260
-
261
254
  console.log(`retrying in ${waitTime}ms: ${url} after error: ${e}`)
262
255
  setTimeout(connect, waitTime)
263
- waitedTime += waitTime
264
256
  waitTime = Math.min(waitTime * 2, 3000)
265
257
  }
266
258
 
@@ -419,7 +411,6 @@ async function braid_fetch (url, params = {}) {
419
411
 
420
412
  params?.retry?.onRes?.(res)
421
413
  waitTime = 10
422
- waitedTime = 0
423
414
  } catch (e) { on_error(e) }
424
415
  }
425
416
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-http",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "An implementation of Braid-HTTP for Node.js and Browsers",
5
5
  "scripts": {
6
6
  "test": "node test/server.js"