summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/internal_binding/stream_wrap.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills/internal_binding/stream_wrap.ts')
-rw-r--r--ext/node/polyfills/internal_binding/stream_wrap.ts4
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;
}
}