Skip to content

Commit

Permalink
ws-transport: delete close code
Browse files Browse the repository at this point in the history
WebSocket.close() does not accept code=1002 per MDN reference.
  • Loading branch information
yoursunny committed Mar 9, 2024
1 parent e302126 commit f2014d8
Show file tree
Hide file tree
Showing 20 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions integ/browser-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
"@types/webpack": "^5.28.5",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"html-webpack-plugin": "^5.6.0",
"puppeteer": "^22.4.0",
"puppeteer": "^22.4.1",
"ts-loader": "^9.5.1",
"tslib": "^2.6.2",
"type-fest": "^4.11.1",
"type-fest": "^4.12.0",
"webpack": "^5.90.3",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.2"
Expand Down
2 changes: 1 addition & 1 deletion mk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"js-yaml": "^4.1.0",
"readlink": "^3.0.0",
"split2": "^4.2.0",
"type-fest": "^4.11.1"
"type-fest": "^4.12.0"
},
"dependencies": {
"compare-versions": "6.1.0"
Expand Down
2 changes: 1 addition & 1 deletion pkg/autoconfig/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
"@types/default-gateway": "^7.2.2",
"@types/koa": "^2.15.0",
"koa": "^2.15.0",
"type-fest": "^4.11.1"
"type-fest": "^4.12.0"
}
}
2 changes: 1 addition & 1 deletion pkg/keychain-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"env-var": "^7.4.1",
"fast-chunk-string": "^1.0.1",
"get-stdin": "^9.0.0",
"nodemailer": "^6.9.11",
"nodemailer": "^6.9.12",
"prompts": "^2.4.2",
"stdout-stream": "^2.0.0",
"tslib": "^2.6.2",
Expand Down
2 changes: 1 addition & 1 deletion pkg/keychain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"idb-keyval": "^6.2.1",
"mnemonist": "^0.39.8",
"tslib": "^2.6.2",
"type-fest": "^4.11.1",
"type-fest": "^4.12.0",
"wait-your-turn": "^1.0.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion pkg/l3face/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"retry": "^0.13.1",
"streaming-iterables": "^8.0.1",
"tslib": "^2.6.2",
"type-fest": "^4.11.1",
"type-fest": "^4.12.0",
"typescript-event-target": "^1.1.0"
}
}
2 changes: 1 addition & 1 deletion pkg/nac/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@yoursunny/asn1": "0.0.20200718",
"mnemonist": "^0.39.8",
"tslib": "^2.6.2",
"type-fest": "^4.11.1"
"type-fest": "^4.12.0"
},
"devDependencies": {
"@ndn/l3face": "workspace:^",
Expand Down
4 changes: 2 additions & 2 deletions pkg/ndncert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
"ajv": "^8.12.0",
"b64-lite": "^1.4.0",
"imap-emails": "^1.0.4",
"nodemailer": "^6.9.11",
"nodemailer": "^6.9.12",
"p-timeout": "^6.1.2",
"tslib": "^2.6.2",
"type-fest": "^4.11.1",
"type-fest": "^4.12.0",
"typescript-event-target": "^1.1.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion pkg/nfdmgmt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"devDependencies": {
"@ndn/l3face": "workspace:*",
"@ndn/node-transport": "workspace:*",
"type-fest": "^4.11.1",
"type-fest": "^4.12.0",
"typescript-event-target": "^1.1.0"
}
}
2 changes: 1 addition & 1 deletion pkg/node-transport/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"event-iterator": "^2.0.0",
"p-event": "^6.0.1",
"tslib": "^2.6.2",
"type-fest": "^4.11.1",
"type-fest": "^4.12.0",
"url-format-lax": "^2.0.0",
"url-parse-lax": "^5.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/packet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"buffer-compare": "^1.1.1",
"mnemonist": "^0.39.8",
"tslib": "^2.6.2",
"type-fest": "^4.11.1"
"type-fest": "^4.12.0"
},
"devDependencies": {
"@types/buffer-compare": "^0.0.33"
Expand Down
2 changes: 1 addition & 1 deletion pkg/pyrepo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"p-defer": "^4.0.0",
"streaming-iterables": "^8.0.1",
"tslib": "^2.6.2",
"type-fest": "^4.11.1",
"type-fest": "^4.12.0",
"typescript-event-target": "^1.1.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion pkg/repo-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
"devDependencies": {
"@ndn/node-transport": "workspace:*",
"stream-mock": "^2.0.5",
"type-fest": "^4.11.1"
"type-fest": "^4.12.0"
}
}
2 changes: 1 addition & 1 deletion pkg/repo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"memory-level": "^1.0.0",
"streaming-iterables": "^8.0.1",
"tslib": "^2.6.2",
"type-fest": "^4.11.1",
"type-fest": "^4.12.0",
"typescript-event-target": "^1.1.0",
"wait-your-turn": "^1.0.1"
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/segmented-object/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@
"@ndn/l3face": "workspace:*",
"@ndn/repo-api": "workspace:*",
"stream-mock": "^2.0.5",
"type-fest": "^4.11.1"
"type-fest": "^4.12.0"
}
}
2 changes: 1 addition & 1 deletion pkg/svs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@ndn/util": "workspace:*",
"streaming-iterables": "^8.0.1",
"tslib": "^2.6.2",
"type-fest": "^4.11.1",
"type-fest": "^4.12.0",
"typescript-event-target": "^1.1.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion pkg/tlv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
"@ndn/util": "workspace:*",
"mnemonist": "^0.39.8",
"tslib": "^2.6.2",
"type-fest": "^4.11.1"
"type-fest": "^4.12.0"
}
}
2 changes: 1 addition & 1 deletion pkg/trust-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@ndn/util": "workspace:*",
"mnemonist": "^0.39.8",
"tslib": "^2.6.2",
"type-fest": "^4.11.1"
"type-fest": "^4.12.0"
},
"devDependencies": {
"@ndn/l3face": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"minimalistic-assert": "^1.0.1",
"streaming-iterables": "^8.0.1",
"tslib": "^2.6.2",
"type-fest": "^4.11.1",
"type-fest": "^4.12.0",
"wait-your-turn": "^1.0.1"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions pkg/ws-transport/src/ws-transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class WsTransport extends Transport {
try {
await pEvent(sock, "open", { timeout: opts.connectTimeout ?? 10000 });
} catch (err: unknown) {
sock.close(1002);
sock.close();
throw err;
}
}
Expand Down Expand Up @@ -87,7 +87,7 @@ export class WsTransport extends Transport {
}

public close(): void {
this.sock.close(1000);
this.sock.close();
}

/** Reopen the transport by connecting again with the same options. */
Expand Down

0 comments on commit f2014d8

Please sign in to comment.