Apparently, non-blocking connect doesn't work on windows if you use 0
timeout in the select call...
This commit is contained in:
parent
63e3d7c5b0
commit
e57f9e9964
7 changed files with 106 additions and 100 deletions
|
@ -228,8 +228,10 @@ static int meth_connect(lua_State *L)
|
|||
|
||||
static int meth_connected(lua_State *L)
|
||||
{
|
||||
p_tcp tcp = (p_tcp) aux_checkclass(L, "tcp{master}", 1);
|
||||
int err = sock_connected(&tcp->sock, &tcp->tm);
|
||||
p_tcp tcp;
|
||||
int err;
|
||||
tcp = (p_tcp) aux_checkclass(L, "tcp{master}", 1);
|
||||
err = sock_connected(&tcp->sock, &tcp->tm);
|
||||
if (err != IO_DONE) {
|
||||
lua_pushnil(L);
|
||||
lua_pushstring(L, sock_strerror(err));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue