1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-07 06:46:59 -05:00

close underlying conn at afterConnect timing

This commit is contained in:
Yoshiya Hinosawa 2024-11-18 19:14:08 +09:00
parent 18cbca8d88
commit 25a9c93745
No known key found for this signature in database
GPG key ID: 9017DB4559488785

View file

@ -100,7 +100,10 @@ import {
Pipe,
PipeConnectWrap,
} from "ext:deno_node/internal_binding/pipe_wrap.ts";
import { ShutdownWrap } from "ext:deno_node/internal_binding/stream_wrap.ts";
import {
kStreamBaseField,
ShutdownWrap,
} from "ext:deno_node/internal_binding/stream_wrap.ts";
import { assert } from "ext:deno_node/_util/asserts.ts";
import { isWindows } from "ext:deno_node/_util/os.ts";
import { ADDRCONFIG, lookup as dnsLookup } from "node:dns";
@ -353,6 +356,7 @@ function _afterConnect(
// Callback may come after call to destroy
if (socket.destroyed) {
handle[kStreamBaseField]?.close();
return;
}