-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not send empty TCP packet in _http_outgoing.js #3947
Comments
See #3803 for reference |
+1 I'd noticed that before too but hadn't managed to get around to fixing it. |
Yeah, it is kind of a way to emit |
Is this a feature request or a bug? |
More like a feature request with the elements of bug fixing. |
Is there a way to reproduce this not-exactly-a-bug reliably? |
I think yes. |
Probably don't want to close this, right? But no one's actively working on it either? Is someone available to mentor an interested potential-contributor who might want to try to implement this? |
Has this been fixed? I added a judicious assert (see diff) and I can't reproduce. diff --git a/deps/uv/src/unix/stream.c b/deps/uv/src/unix/stream.c
index 7b23d16..80805e5 100644
--- a/deps/uv/src/unix/stream.c
+++ b/deps/uv/src/unix/stream.c
@@ -1444,6 +1444,7 @@ int uv_write2(uv_write_t* req,
memcpy(req->bufs, bufs, nbufs * sizeof(bufs[0]));
req->nbufs = nbufs;
req->write_index = 0;
+ assert(0 != uv__count_bufs(bufs, nbufs));
stream->write_queue_size += uv__count_bufs(bufs, nbufs);
/* Append the request to write_queue. */ (It does break some REPL and child process tests but that's expected. The salient part is that no zero-sized TCP writes seem to take place.) |
This seems to be addressed from what I can tell. Please feel free to re-open if you think I'm wrong or this needs to remain open to tackle some edge cases. |
After 99943e1 we send empty TCP packets on
res.end()
in quite many cases. I don't think that it is a serious thing, but it is definitely worth fixing.The text was updated successfully, but these errors were encountered: