mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
fix: [ws] sock shouldn't throw eof error when failed to read frame (#4083)
This commit is contained in:
parent
e9fff02e96
commit
d9886a44d1
6 changed files with 136 additions and 56 deletions
|
@ -378,3 +378,8 @@ export function unimplemented(msg?: string): never {
|
|||
export function unreachable(): never {
|
||||
throw new AssertionError("unreachable");
|
||||
}
|
||||
|
||||
export function assertNotEOF<T extends {}>(val: T | Deno.EOF): T {
|
||||
assertNotEquals(val, Deno.EOF);
|
||||
return val as T;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue