spdy-http2 / node-spdy

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

Emit connection errors as server sessionError #375

Open pimterry opened 3 years ago

pimterry commented 3 years ago

Super tiny PR that fixes #374.

This doesn't expose all errors, there's definitely more that could be done here, but this is an easy useful addition imo.

It doesn't match up that closely to the node API, not sure how important that is to you, but it's broadly similar. The equivalent node sessionError event is emitted with the error and the session, not the socket, the error code etc values are different, and I expect it's not emitted in exactly the same cases.

franz-josef-kaiser commented 3 years ago

@daviddias Could you take a look at this?