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:
parent
18cbca8d88
commit
25a9c93745
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue