http compat won't always call callback on end method
ronag opened this issue · comments
Robert Nagy commented
See, https://github.com/nodejs/node/blob/master/lib/internal/http2/compat.js#L651
end(chunk, encoding, cb) {
const stream = this[kStream];
const state = this[kState];
if ((state.closed || state.ending) &&
state.headRequest === stream.headRequest) {
return this;
}
...
This code will never call cb
(inside the condition) causing a potential deadlock.