Skip to content

Commit

Permalink
fix: emit 'finish' event when response is closed in transformProtocol…
Browse files Browse the repository at this point in the history
…Request
  • Loading branch information
purocean committed Jun 18, 2024
1 parent a478d03 commit 676ad07
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,9 @@ export async function transformProtocolRequest (request: ProtocolRequest) {
},
})

res.on('close', () => {
res.emit('finish')
})

return { req, res, out }
}

0 comments on commit 676ad07

Please sign in to comment.