diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2024-09-11 19:19:02 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-11 19:19:02 +0900 |
commit | 200145a09a51e96298f1ecd5ce78f75c27c7880a (patch) | |
tree | 9fce91280f324673233d435523d6fb675e137fba /ext/node/polyfills/internal_binding/stream_wrap.ts | |
parent | ad30703e8e6bcf0fb87b5bc4ad1b49d040e54c77 (diff) |
fix(ext/node): avoid showing `UNKNOWN` error from TCP handle (#25550)
Diffstat (limited to 'ext/node/polyfills/internal_binding/stream_wrap.ts')
-rw-r--r-- | ext/node/polyfills/internal_binding/stream_wrap.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/node/polyfills/internal_binding/stream_wrap.ts b/ext/node/polyfills/internal_binding/stream_wrap.ts index dc30bfdfe..7aea83d6f 100644 --- a/ext/node/polyfills/internal_binding/stream_wrap.ts +++ b/ext/node/polyfills/internal_binding/stream_wrap.ts @@ -38,6 +38,7 @@ import { TextEncoder } from "ext:deno_web/08_text_encoding.js"; import { Buffer } from "node:buffer"; import { notImplemented } from "ext:deno_node/_utils.ts"; import { HandleWrap } from "ext:deno_node/internal_binding/handle_wrap.ts"; +import { ownerSymbol } from "ext:deno_node/internal/async_hooks.ts"; import { AsyncWrap, providerType, @@ -343,7 +344,8 @@ export class LibuvStreamWrap extends HandleWrap { ) { nread = codeMap.get("ECONNRESET")!; } else { - nread = codeMap.get("UNKNOWN")!; + this[ownerSymbol].destroy(e); + return; } } |