This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Sockets leak #201
Labels
Comments
achingbrain
added a commit
that referenced
this issue
Aug 31, 2022
We call `.end` on a socket and wait for the `close` event, but calling `.end` only closes the writable end of the socket. To close both ends we either need to wait for the remote to close their writable end or we need to `.destroy` our socket. If we call `.destroy` all data is lost and no more I/O occurs. The change here is to call `.end` then check to see if we have any outgoing writes, if we do, wait for the `drain` event which means the outgoing data has been sent, then call `.destroy`, otherwise call `.destroy` immediately. At the same time use a timer to call `.destroy` if the `drain` event never arrives. It also set up the `timeout` event for the socket to allow closing the socket after a period of inactivity. Three new constructor options are added to control the behvaiour: - `inboundSocketInactivityTimeout` the socket will be closed after this many ms of not sending/recieving data (default 30s) - `outboundSocketInactivityTimeout` the socket will be closed after this many ms of not sending/recieving data (default 30s) - `socketCloseTimeout` how long to wait for the `drain` event (default 2s) Fixes #201
🎉 This issue has been resolved in version 3.0.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Possibly related, this may even be a dupe of #141 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
process._getActiveHandles()
, in the last 7 days:The text was updated successfully, but these errors were encountered: