Skip to content
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

Node version 10 breaking change causing false positive connection end msg #28

Closed
glebec opened this issue May 30, 2018 · 5 comments
Closed
Labels

Comments

@glebec
Copy link
Owner

glebec commented May 30, 2018

Getting connection closed before res end/flush on every single request in Node v10+.

@ronag
Copy link

ronag commented May 30, 2018

There was a bug related to this in 10.2.0. But it should have been fixed in 10.2.1. What version of node are you experiencing this on?

@glebec
Copy link
Owner Author

glebec commented May 30, 2018

@ronag 10.3.0.

@ronag
Copy link

ronag commented May 30, 2018

Yea, you need to remove the close listener on 'finish'. Alternatively you could use req.on('aborted') to achieve what I believe you are looking for.

@glebec
Copy link
Owner Author

glebec commented May 30, 2018

Yep, I have been looking at the Node changelog. As of this post, the docs still claim that close "indicates that the underlying connection was terminated before response.end() was called or able to flush" – that doesn't appear to be 100% accurate anymore. Removing the close listener upon finish sounds promising, I'll try it later. Thanks, —G.

@ronag
Copy link

ronag commented May 31, 2018

nodejs/node#21047

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants