Skip to content

Is there a way to handle cancelled requests #4408

Closed Answered by holoyan
hbatalhaStch asked this question in Help
Discussion options

You must be logged in to vote

router.get('/t', async (ctx) => {
  ctx.request.request.socket.on('close', () => {
    // do something
  })
})


from source code seems that ctx.request.request is instance of incoming request

@hbatalhaStch

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@hbatalhaStch
Comment options

Comment options

You must be logged in to vote
1 reply
@hbatalhaStch
Comment options

Answer selected by hbatalhaStch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants