aboutsummaryrefslogtreecommitdiff
path: root/src/tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tcp.c')
-rw-r--r--src/tcp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tcp.c b/src/tcp.c
index 3a84191..162d5af 100644
--- a/src/tcp.c
+++ b/src/tcp.c
@@ -228,9 +228,8 @@ static int meth_connect(lua_State *L)
228 228
229static int meth_connected(lua_State *L) 229static int meth_connected(lua_State *L)
230{ 230{
231 static t_tm tm = {-1, -1};
232 p_tcp tcp = (p_tcp) aux_checkclass(L, "tcp{master}", 1); 231 p_tcp tcp = (p_tcp) aux_checkclass(L, "tcp{master}", 1);
233 int err = sock_connected(&tcp->sock, &tm); 232 int err = sock_connected(&tcp->sock, &tcp->tm);
234 if (err != IO_DONE) { 233 if (err != IO_DONE) {
235 lua_pushnil(L); 234 lua_pushnil(L);
236 lua_pushstring(L, sock_strerror(err)); 235 lua_pushstring(L, sock_strerror(err));