Skip to content

Commit

Permalink
fix: bad client destroy on servername change
Browse files Browse the repository at this point in the history
Fixes: #3065
  • Loading branch information
ronag committed Apr 7, 2024
1 parent cae5625 commit ae19601
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/dispatcher/client.js
Expand Up @@ -581,7 +581,10 @@ function _resume (client, sync) {
}

client[kServerName] = request.servername
client[kHTTPContext]?.destroy(new InformationalError('servername changed'))
client[kHTTPContext]?.destroy(new InformationalError('servername changed'), () => {
client[kHTTPContext] = null
resume(client)
})
}

if (client[kConnecting]) {
Expand Down

0 comments on commit ae19601

Please sign in to comment.