Skip to content

Commit

Permalink
fix: always resume after complete if not destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Oct 5, 2020
1 parent 4208071 commit 1c628a9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/core/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -621,14 +621,12 @@ class Parser extends HTTPParser {
util.destroy(socket, new InformationalError('reset'))
} else if (!this.shouldKeepAlive) {
util.destroy(socket, new InformationalError('reset'))
} else if (client[kReset]) {
} else if (client[kReset] && !client.running) {
// Destroy socket once all requests have completed.
// The request at the tail of the pipeline is the one
// that requested reset and no further requests should
// have been queued since then.
if (!client.running) {
util.destroy(socket, new InformationalError('reset'))
}
util.destroy(socket, new InformationalError('reset'))
} else {
socket[kResume]()
resume(client)
Expand Down

0 comments on commit 1c628a9

Please sign in to comment.