Skip to content

Commit f607577

Browse files
committed
src: use DoTryWrite() for not-all-Buffer writev()s too
PR-URL: #18019 Reviewed-By: James M Snell <[email protected]>
1 parent f17987b commit f607577

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/stream_base.cc

+7
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,13 @@ int StreamBase::Writev(const FunctionCallbackInfo<Value>& args) {
192192
offset += str_size;
193193
bytes += str_size;
194194
}
195+
196+
err = DoTryWrite(&buf_list, &count);
197+
if (err != 0 || count == 0) {
198+
req_wrap->Dispatched();
199+
req_wrap->Dispose();
200+
goto done;
201+
}
195202
}
196203

197204
err = DoWrite(req_wrap, buf_list, count, nullptr);

0 commit comments

Comments
 (0)