diff --git a/src/stream_base.cc b/src/stream_base.cc index 225103cc8d727a..6807c6a32ee135 100644 --- a/src/stream_base.cc +++ b/src/stream_base.cc @@ -192,6 +192,13 @@ int StreamBase::Writev(const FunctionCallbackInfo& 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);