Closed nferch closed 3 months ago
@nferch thanks for taking out an issue.
Confirming:
I'd have to think on this / repro. This is a bit of a head scratcher that there are open sockets, because there is no open handles -- and IME, pending fetch requests get reflected as callbacks on the event loop.
Weeeird 😅
@nferch I reprod this -- the socket shows clear, but it might take until the next event loop.
await analytics.closeAndFlush()
setImmediate(() => wtf.dump())
results in no open sockets:
// [WTF Node?] open handles:
- File descriptors: (note: stdio always exists)
- fd 2 (tty) (stdio)
- fd 1 (tty) (stdio)
closeAndFlush()
does not close the HTTPS connection to the Segment API: