braid-http 1.3.13 → 1.3.14

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.
package/LICENSE.txt ADDED
@@ -0,0 +1,11 @@
1
+ Invisible Property License
2
+
3
+ 1. You have the right to use this IP for any purpose.
4
+ 2. If you make profit, you agree to give back a fair share of the profit to
5
+ the creators of this IP.
6
+ 3. The creators will tell you how much they think is a fair share, if your
7
+ usage matters to them, and promise not to take you to court to enforce
8
+ the agreement.
9
+
10
+ (In other words, this license thus runs on the honor system. You are invited
11
+ to participate in our community with honor.)
@@ -222,7 +222,7 @@ async function braid_fetch (url, params = {}) {
222
222
  () => underlying_aborter.abort()
223
223
  )
224
224
 
225
- var waitTime = 10
225
+ var waitTime = 1
226
226
  var res = null
227
227
  var subscription_cb = null
228
228
  var subscription_error = null
@@ -240,9 +240,9 @@ async function braid_fetch (url, params = {}) {
240
240
 
241
241
  underlying_aborter.abort()
242
242
 
243
- console.log(`retrying in ${waitTime}ms: ${url} after error: ${e}`)
244
- setTimeout(connect, waitTime)
245
- waitTime = Math.min(waitTime * 2, 3000)
243
+ console.log(`retrying in ${waitTime}s: ${url} after error: ${e}`)
244
+ setTimeout(connect, waitTime * 1000)
245
+ waitTime = Math.min(waitTime + 1, 3)
246
246
  }
247
247
 
248
248
  try {
@@ -399,7 +399,7 @@ async function braid_fetch (url, params = {}) {
399
399
  done(res)
400
400
 
401
401
  params?.retry?.onRes?.(res)
402
- waitTime = 10
402
+ waitTime = 1
403
403
  } catch (e) { on_error(e) }
404
404
  }
405
405
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-http",
3
- "version": "1.3.13",
3
+ "version": "1.3.14",
4
4
  "description": "An implementation of Braid-HTTP for Node.js and Browsers",
5
5
  "scripts": {
6
6
  "test": "node test/server.js"