When a client disconnects mid-stream, headers are already sent so the catch block now calls response.end() before returning, preventing the socket from being left open and crashing the server. Fixes #445.
When a client disconnects mid-stream, headers are already sent so the catch block now calls response.end() before returning, preventing the socket from being left open and crashing the server. Fixes #445.