deno
056d475b - fix(ext/node): don't delay http2 client EOF when there's no body

Commit
75 days ago
fix(ext/node): don't delay http2 client EOF when there's no body The previous commit buffered the trailing null EOF along with body data until 'response', but a no-body response (END_STREAM on headers) pushes only the null. Deferring that null by a tick let a peer that tears the stream down immediately (e.g. test-http2-compat-socket.js destroys the socket) race ahead, dropping the client 'end' event. Only buffer once actual body data is queued; a lone null EOF is already ordered after 'response' by the nextTick queue, so let it pass through.
Author
Parents
Loading