Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upWhat logic is behind uv_is_readable/writable applicable to tcp sockets? #1798
Comments
bnoordhuis
added
bug
help-wanted
good-first-contribution
labels
Apr 16, 2018
This comment has been minimized.
This comment has been minimized.
A borderline bug. You're supposed to close it on error (as you say), you wouldn't try to read or write.
I'd say that's a UNIX bug. The Windows behavior is correct. Pull requests welcome, of course. |
This comment has been minimized.
This comment has been minimized.
|
Will try to fix it, I've already created test and fix for 2 problem, hope I will have a time to work on 1 today. Updated. |
OleksandrKvl commentedApr 16, 2018
Hi, I observe behavior that looks confusing to me with these functions.
On windows when connection has been reset by remote side, in read callback that got error socket still remains readable and writable. But obviously we can do nothing else with it except close.
On windows immediately after uv_shutdown(), socket becomes not writable.
But on unix(in my case it was Android, but source file for that is the same) after uv_shutdown(), it's still writable.
I check latest source files and have not found any changes related to those flags.