mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-09-17 00:22:03 +02:00
Apparently, non-blocking connect doesn't work on windows if you use 0
timeout in the select call...
This commit is contained in:
@@ -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));
|
||||
|
Reference in New Issue
Block a user