You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
For httpsOverHttp and httpsOverHttps tunnels, createSocket method is replaced with createSecureSocket which adds the actual socket as a member of the object returned from tls.connect. Subsequent processing places listeners on this tls connection object and not on the underlying socket. When these listener callbacks invoke removeSocket, they end up providing the tls.connect object as an argument and not the actual underlying socket.
The removeSocket looks for a match of the provided tls.connect object to an element in the array in order to find the one to remove. However, since the actual underyling transport socket is what is placed in the sockets member array, no match is found, nothing is removed, and eventually the sockets array fills up to the maxSockets length and subsequent requests will be queued permanently.
Recommending providing a removeSecureSocket method
And then replacing the removeSocket method for httpsOverHttp and httpsOverHttps instances with the secure socket version (essentially mirroring what is done for createSocket)
For httpsOverHttp and httpsOverHttps tunnels,
createSocket
method is replaced withcreateSecureSocket
which adds the actual socket as a member of the object returned fromtls.connect
. Subsequent processing places listeners on this tls connection object and not on the underlying socket. When these listener callbacks invoke removeSocket, they end up providing the tls.connect object as an argument and not the actual underlying socket.The removeSocket looks for a match of the provided tls.connect object to an element in the array in order to find the one to remove. However, since the actual underyling transport socket is what is placed in the sockets member array, no match is found, nothing is removed, and eventually the sockets array fills up to the
maxSockets
length and subsequent requests will be queued permanently.Recommending providing a
removeSecureSocket
methodAnd then replacing the
removeSocket
method for httpsOverHttp and httpsOverHttps instances with the secure socket version (essentially mirroring what is done for createSocket)The text was updated successfully, but these errors were encountered: