spdy-http2 / node-spdy

SPDY server on Node.js
2.81k stars 196 forks source link

Connection errors are not exposed #374

Open pimterry opened 3 years ago

pimterry commented 3 years ago

https://github.com/spdy-http2/node-spdy/blob/9f96629dc59a6c7216cdeefbe920982a5ad55d6c/lib/spdy/server.js#L127-L129

Here :arrow_up: the server listens for connection errors, and then silently shuts down the socket.

It doesn't provide any easy way to listen for these errors though, like Node HTTP/1.1's clientError event or HTTP/2's sessionError event, so code using node-spdy never knows that this has happened.

This can be useful for error reporting and monitoring. I'm going to work around this manually in my application, but built-in support would be useful. Are you be open to a PR adding this?