braid-http 1.3.96 → 1.3.97

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.
@@ -1223,6 +1223,11 @@ async function create_multiplexer(origin, mux_key, params, mux_params, attempt)
1223
1223
 
1224
1224
  var res = await normal_fetch(url, params)
1225
1225
 
1226
+ // The server received our request — if we need to tear it
1227
+ // down later, send a DELETE. (Skip for network errors, where
1228
+ // normal_fetch throws and we never reach here.)
1229
+ established = true
1230
+
1226
1231
  if (res.status === 409) {
1227
1232
  var e = await res.json()
1228
1233
  if (e.error === 'Request already multiplexed') {
@@ -1269,10 +1274,6 @@ async function create_multiplexer(origin, mux_key, params, mux_params, attempt)
1269
1274
  + res.headers.get('Multiplex-Version'),
1270
1275
  { dont_retry: true })
1271
1276
 
1272
- // The server acknowledged this request — mark it so we
1273
- // know to send a DELETE if we need to tear it down later
1274
- established = true
1275
-
1276
1277
  // we want to present the illusion that the connection is still open,
1277
1278
  // and therefor closable with "abort",
1278
1279
  // so we handle the abort ourselves to close the multiplexed request
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-http",
3
- "version": "1.3.96",
3
+ "version": "1.3.97",
4
4
  "description": "An implementation of Braid-HTTP for Node.js and Browsers",
5
5
  "scripts": {
6
6
  "test": "node test/test.js",