mirror of https://github.com/nodejs/node.git
http2: destroy() stream, upon errnoException
First steps towards #19060 PR-URL: https://github.com/nodejs/node/pull/19389 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit is contained in:
parent
38bae5dc23
commit
84afd6e492
|
@ -1680,7 +1680,7 @@ class Http2Stream extends Duplex {
|
|||
req.async = false;
|
||||
const err = createWriteReq(req, handle, data, encoding);
|
||||
if (err)
|
||||
throw errnoException(err, 'write', req.error);
|
||||
return this.destroy(errnoException(err, 'write', req.error), cb);
|
||||
trackWriteState(this, req.bytes);
|
||||
}
|
||||
|
||||
|
@ -1723,7 +1723,7 @@ class Http2Stream extends Duplex {
|
|||
}
|
||||
const err = handle.writev(req, chunks);
|
||||
if (err)
|
||||
throw errnoException(err, 'write', req.error);
|
||||
return this.destroy(errnoException(err, 'write', req.error), cb);
|
||||
trackWriteState(this, req.bytes);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue