node-http2 icon indicating copy to clipboard operation
node-http2 copied to clipboard

Silently fails to send over closed connection (client)

Open ashimoon opened this issue 9 years ago • 0 comments
trafficstars

After a server closes the connection, the connection is marked as closed, but the connection is kept in the endpoint[key] cache.

Later requests to send data over that connection fail silently (Connection.prototype._send checks _closed, silently returns).

This manifests itself in some number of requests succeeding, and then suddenly no more requests succeed, with no error.

I've fixed it locally by having the connection emit a new event "closed". Endpoint re-emits this event, and Agent finally handles it by removing the closed endpoint/connection from Agent.endpoints.

ashimoon avatar Nov 05 '16 09:11 ashimoon