You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the request handler is asynchronous (and anything other than a timer, which is cleaned up specially in domain.dispose() - an http request for a slow resource is a good example), and the client closes its connection (calling domain.dispose to be called, which calls res.end()), then when our request handler's async method returns, it runs in the app's domain, not the request domain (which no longer exists), and any calls to res.writeHead() will now cause an app-level crash (saying headers have already been written).
Fix is probably to just not call domain.dispose() in response to 'close' on the response object.
The text was updated successfully, but these errors were encountered:
If the request handler is asynchronous (and anything other than a timer, which is cleaned up specially in domain.dispose() - an http request for a slow resource is a good example), and the client closes its connection (calling domain.dispose to be called, which calls res.end()), then when our request handler's async method returns, it runs in the app's domain, not the request domain (which no longer exists), and any calls to res.writeHead() will now cause an app-level crash (saying headers have already been written).
Fix is probably to just not call domain.dispose() in response to 'close' on the response object.
The text was updated successfully, but these errors were encountered: