-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
http: emit timeout duration overflow warning sync #18906
Conversation
d1c7192
to
d27fbed
Compare
Emit the `TimeoutOverflowWarning` synchronously, even when still connecting, to get a better stack trace.
@nodejs/http The test I’m adding here is failing in some CI machines with: events.js:116
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at TCP.onread (net.js:625:25) Could I ask you to take a look at the test? I’m pretty certain it’s not related to the code change here, but I’d be curious to know whether there’s anything obviously wrong with it… |
http.request(`http://localhost:${server.address().port}`) | ||
.setTimeout(2 ** 40) | ||
.end(() => { | ||
server.close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this would be considered an issue with the test... there's a race condition between the server being closed and the request being processed. Most of these http
tests would put the server.close();
in an event listener for end
rather than a callback. Not sure if this is expected behaviour or a bug though... I can see a case for both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See something like https://github.com/nodejs/node/blob/master/test/parallel/test-http-client-upload.js for an example.
d27fbed
to
cecd7f5
Compare
cecd7f5
to
3044474
Compare
@apapirovski Okay, I think I got it right. I am surprised though, I wouldn’t think it’s possible for the |
@addaleax Yeah, I honestly don't know... As far as I can tell, no one that knows the |
CI: https://ci.nodejs.org/job/node-test-pull-request/13483/ (Windows completely failed last time around) |
Landed in 648d668 |
Emit the `TimeoutOverflowWarning` synchronously, even when still connecting, to get a better stack trace. With thanks to Anatoli Papirovski for providing helpful tips when writing the test. PR-URL: #18906 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
Emit the `TimeoutOverflowWarning` synchronously, even when still connecting, to get a better stack trace. With thanks to Anatoli Papirovski for providing helpful tips when writing the test. PR-URL: nodejs#18906 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
Emit the
TimeoutOverflowWarning
synchronously, even whenstill connecting, to get a better stack trace.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
http