-
Notifications
You must be signed in to change notification settings - Fork 637
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
couldn't check remote was closed #174
Comments
Maybe this could happen on the first call. But on the second call, it should return IO_CLOSED, no? |
yes,not fist call,it allways return timeout, |
Just saying "Me too". Also experiencing this problem with my program, and while searching found this thread. Looks like sydnash is correct. |
as this in wsocket.c line 256 try again but may it missing continue ? prev still IO_DONE
in function may be missing continue ? |
Does #81 help with figuring out if the remote side closed? |
I wonder this change would dead loop doing socket the block check. |
local data, status, partial = self.tcp:receive("_a")
if __status == STATUS_CLOSED or _status == STATUS_NOT_CONNECTED then
--remote was closed.
end
I use code above to check remote socket is closed,but the status is allways timeout because the code at wsocket.c(socket_waitfd):
if (timeout_iszero(tm)) return IO_TIMEOUT; / optimize timeout == 0 case */
because my socket is non-blocking,so it allways return timeout here。after delete this line,it's return closed。
The text was updated successfully, but these errors were encountered: