Skip to content

Commit

Permalink
fix: missing error handler (#3859)
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag authored Nov 21, 2024
1 parent a427e4b commit 6551919
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/dispatcher/client-h1.js
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,19 @@ async function connectH1 (client, socket) {
client[kSocket] = socket

if (!llhttpInstance) {
const noop = () => {}
socket.on('error', noop)
llhttpInstance = await llhttpPromise
llhttpPromise = null
socket.off('error', noop)
}

if (socket.errored) {
throw socket.errored
}

if (socket.destroyed) {
throw new SocketError('destroyed')
}

socket[kNoRef] = false
Expand Down

0 comments on commit 6551919

Please sign in to comment.