diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-01-10 22:39:05 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-01-14 16:41:16 +0300 |
commit | 02fef8ad5a6c0e5c1ce0d4b46aa3a762935c981c (patch) | |
tree | 05bbd0c47c536bc6abc4a34a214f31ca14be4b0a /src/stream_base.cc | |
parent | 20f6aaee7308d5f426de11def6ad9de8848222f5 (diff) |
src: use `DoTryWrite()` for not-all-Buffer writev()s too
PR-URL: https://github.com/nodejs/node/pull/18019
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/stream_base.cc')
-rw-r--r-- | src/stream_base.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/stream_base.cc b/src/stream_base.cc index ecb5f3dd1b9..0fb801ddd57 100644 --- a/src/stream_base.cc +++ b/src/stream_base.cc @@ -192,6 +192,13 @@ int StreamBase::Writev(const FunctionCallbackInfo<Value>& args) { offset += str_size; bytes += str_size; } + + err = DoTryWrite(&buf_list, &count); + if (err != 0 || count == 0) { + req_wrap->Dispatched(); + req_wrap->Dispose(); + goto done; + } } err = DoWrite(req_wrap, buf_list, count, nullptr); |