-
Notifications
You must be signed in to change notification settings - Fork 7.3k
http response pause lets event loop exit when there's an actively ref'd connection #6305
Comments
Ok, so https://github.com/joyent/libuv/blob/v0.10/src/unix/stream.c#L1320-L1321 if the stream is not also writable we'll remove the stream from holding the loop open. So this seems to be the expected behavior with regard to libuv. There's nothing left to resume the client, so the loop is reasonably free to exit the loop. It's slightly frustrating that in this case we don't notify the socket is being torn down, but doing so would potentially let the user insert more events into the event loop. We have discussed that idea before, and there's still #5583 as an example of |
Unlike the 'exit' event, this event allows the user to schedule more work and thereby postpone the exit. That also means that the 'beforeExit' event may be emitted many times, see the attached test case for an example. Refs nodejs#6305.
Unlike the 'exit' event, this event allows the user to schedule more work and thereby postpone the exit. That also means that the 'beforeExit' event may be emitted many times, see the attached test case for an example. Refs #6305.
@indutny @bnoordhuis @tjfontaine ... any further thoughts on this one? |
I don't think this is an issue anymore but I wasn't really involved in this particular bug. |
Closing then. Can reopen if necessary. |
While there's nothing really for the child to continue doing here, so long as the connection is alive the loop should also be alive.
The text was updated successfully, but these errors were encountered: