Skip to content

Comments

Allow res.end() to be used to force-disconnect a client#1

Open
tobyfoo wants to merge 1 commit intozacbarton:masterfrom
tobyfoo:master
Open

Allow res.end() to be used to force-disconnect a client#1
tobyfoo wants to merge 1 commit intozacbarton:masterfrom
tobyfoo:master

Conversation

@tobyfoo
Copy link

@tobyfoo tobyfoo commented Oct 27, 2017

Clear keep-alive timer on ServerResponse's both close and finish events.
This will allow res.end() to be called if a client should be forced to disconnect, without the keep-alive doing a write() to a closed connection, throwing an unhandled exception.

This will allow res.end() to be called if a client should be forced to disconnect, without the keep-alive doing a write() to a closed connection, throwing an unhandled exception.
Background: Close is fired when the client disconnects or the connection is lost before res.end(). Finish is fired when the response has been send, i.e. res.end() was called.
@tobyfoo
Copy link
Author

tobyfoo commented Oct 27, 2017

Thanks for this useful and simple library.
Greetings from Germany

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant