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
http: attach error handler to socket synchronously in onSocket
Between onSocket and onSocketNT, the socket had no error handler,
meaning any errors emitted during that window (e.g. from a blocklist
check or custom lookup) would be unhandled even if the user had set up
a request error handler.
Fix this by attaching socketErrorListener synchronously in onSocket,
setting socket._httpMessage so the listener can forward errors to the
request. tickOnSocket removes and re-adds the listener after the parser
is set up to avoid duplicates. The _destroy path in onSocketNT is also
guarded to prevent double-firing if socketErrorListener already emitted
the error.
Fixes: #61658 (comment)
0 commit comments