"disconnected" should be printed to the process output
Code to reproduce
Sorry to leave this empty now If I have energy to setup a more elaborate test sample later, I will. Using console.log, I was able to find that this call mutates the ctx object and seems to originate the problem.
Describe the bug
Node.js version: v19.9.0
OS version: Darwin MBP 21.6.0 Darwin Kernel Version 21.6.0: Thu Mar 9 20:08:59 PST 2023; root:xnu-8020.240.18.700.8~1/RELEASE_X86_64 x86_64
Description: functions added to koa's close hook are never called, when the hook is defined after
app.use(bodyParser)
Actual behavior
Using the pattern below in a koa service with koa-body, nothing is printed to the process output when a client prematurely disconnects,
Expected behavior
"disconnected" should be printed to the process output
Code to reproduce
Sorry to leave this empty now If I have energy to setup a more elaborate test sample later, I will. Using console.log, I was able to find that this call mutates the ctx object and seems to originate the problem.
related upstream issue: https://github.com/cojs/co-body/issues/85
the cojs project appears to have been abandoned :/
Checklist