mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
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:
1 parent
38bae5dc23
commit
84afd6e492
1 file changed
+2
-2
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user