Bug in forward.lua. Wasn't breaking from the loop.
This commit is contained in:
parent
434e8e014c
commit
9596c7f95d
3 changed files with 18 additions and 12 deletions
|
@ -213,13 +213,14 @@ static int meth_connect(lua_State *L)
|
|||
unsigned short port = (unsigned short) luaL_checknumber(L, 3);
|
||||
p_tm tm = tm_markstart(&tcp->tm);
|
||||
const char *err = inet_tryconnect(&tcp->sock, address, port, tm);
|
||||
/* have to set the class even if it failed due to non-blocking connects */
|
||||
aux_setclass(L, "tcp{client}", 1);
|
||||
if (err) {
|
||||
lua_pushnil(L);
|
||||
lua_pushstring(L, err);
|
||||
return 2;
|
||||
}
|
||||
/* turn master object into a client object */
|
||||
aux_setclass(L, "tcp{client}", 1);
|
||||
lua_pushnumber(L, 1);
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue