mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
stream_wrap: support empty TryWrite
s
Decrement `vcount` in `DoTryWrite` even if some of the buffers are empty. PR-URL: https://github.com/nodejs/node/pull/3128
This commit is contained in:
parent
b3d96782d4
commit
a4fa51cd02
@ -313,7 +313,7 @@ int StreamWrap::DoTryWrite(uv_buf_t** bufs, size_t* count) {
|
||||
// Slice off the buffers: skip all written buffers and slice the one that
|
||||
// was partially written.
|
||||
written = err;
|
||||
for (; written != 0 && vcount > 0; vbufs++, vcount--) {
|
||||
for (; vcount > 0; vbufs++, vcount--) {
|
||||
// Slice
|
||||
if (vbufs[0].len > written) {
|
||||
vbufs[0].base += written;
|
||||
|
Loading…
Reference in New Issue
Block a user