mirror of
https://github.com/denoland/deno.git
synced 2024-12-28 01:59:06 -05:00
fix(cli): fix WebSocket close (#8776)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
parent
d6c05b09dd
commit
7f8b44a60d
1 changed files with 1 additions and 1 deletions
|
@ -256,7 +256,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
close(code, reason) {
|
close(code, reason) {
|
||||||
if (code && (code !== 1000 && !(3000 <= code > 5000))) {
|
if (code && !(code === 1000 || (3000 <= code && code < 5000))) {
|
||||||
throw new DOMException(
|
throw new DOMException(
|
||||||
"The close code must be either 1000 or in the range of 3000 to 4999.",
|
"The close code must be either 1000 or in the range of 3000 to 4999.",
|
||||||
"NotSupportedError",
|
"NotSupportedError",
|
||||||
|
|
Loading…
Reference in a new issue