-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
disconnect
event does not fire when the route's options.payload.output
is data
or file
#4339
Comments
Very similar to #4315, feel free to close if considered duplicate. |
Indeed, this is the same issue. In node v16 I am closing as a duplicate, but your report is appreciated! Also, I saw that you came-up with a workaround in elastic/kibana#126184. If you'd be open to contributing the approach to hapi, we would love to take a look. Also found this open issue, which I've subscribed to in case there's any further conversation in node nodejs/node#41117 |
Support plan
Context
16.13.2
20.2.1
, probably othersWhat are you trying to achieve or the steps to reproduce?
For some reason, when a route's
options.payload.output
is set todata
orfile
, canceling the request from the client does not cause thedisconnect
event (on hapi's request) or theaborted
event (on the underlyingrequest.raw.req
) to fire. This works fine whenoutput
is set tostream
, or for non-payload requests such asGET
A complete reproduction scenario:
What was the result you got?
What result did you expect?
Additional information
If it helps, I somewhat tracked it down to
@hapi/subtext
, ininternals.parse
. If you exit early in the function to treatfile
anddata
asstream
:The tests go green.
So it seems likely that something deeper in
and
may be causing the problem. Unfortunately after taking a look deeper, I couldn't really understand what could be causing this.
The text was updated successfully, but these errors were encountered: