projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb7a491
)
stream_wrap: support empty `TryWrite`s
author
Fedor Indutny
<fedor@indutny.com>
Sat, 3 Oct 2015 20:15:15 +0000
(16:15 -0400)
committer
Rod Vagg
<rod@vagg.org>
Mon, 5 Oct 2015 11:33:41 +0000
(22:33 +1100)
Decrement `vcount` in `DoTryWrite` even if some of the buffers are
empty.
PR-URL: https://github.com/nodejs/node/pull/3128
src/stream_wrap.cc
patch
|
blob
|
history
diff --git
a/src/stream_wrap.cc
b/src/stream_wrap.cc
index
120e2c4
..
e6236a6
100644
(file)
--- a/
src/stream_wrap.cc
+++ b/
src/stream_wrap.cc
@@
-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;