Skip to content

Commit

Permalink
fix createServerResponse timings
Browse files Browse the repository at this point in the history
  • Loading branch information
nitedani committed Aug 5, 2024
1 parent 4f54cbe commit 7965d6f
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,14 @@ function createServerResponse(incomingMessage: IncomingMessage) {
)

passThrough.once('finish', () => {
res.emit('finish')
setTimeout(() => {
res.emit('finish')
}, 0)
})
passThrough.once('close', () => {
res.emit('close')
setTimeout(() => {
res.emit('close')
}, 0)
})
passThrough.on('drain', () => {
res.emit('drain')
Expand Down

0 comments on commit 7965d6f

Please sign in to comment.