Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
src: use DoTryWrite() for not-all-Buffer writev()s too
  • Loading branch information
addaleax committed Jan 10, 2018
commit 72ff4605e476e2b810bf8cbe0c11e6cb7616b01e
7 changes: 7 additions & 0 deletions src/stream_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down