Skip to content

Commit

Permalink
feat: aborted request handling in reply.send
Browse files Browse the repository at this point in the history
  • Loading branch information
Allain55 committed Jan 24, 2022
1 parent 4928abc commit 172c3ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/reply.js
Expand Up @@ -130,6 +130,10 @@ Reply.prototype.send = function (payload) {
return this
}

if (this.request.raw && this.request.raw.aborted === true) {
return this
}

if (payload === undefined) {
onSendHook(this, payload)
return this
Expand Down

0 comments on commit 172c3ed

Please sign in to comment.