Skip to content

Commit

Permalink
handle abort
Browse files Browse the repository at this point in the history
  • Loading branch information
remorses committed May 1, 2024
1 parent 0d53c94 commit b316717
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/next/src/server/lib/server-ipc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ export async function createIpcServer(
req.on('error', (err) => {
reject(err)
})
res.on('close', function () {
let aborted = !res.writableFinished
if (aborted) {
reject(new Error('ipc request aborted'))
}
})
})
const args: any[] = JSON.parse(body || '[]')

Expand Down

0 comments on commit b316717

Please sign in to comment.