diff options
Diffstat (limited to 'lem/io/tcp.c')
-rw-r--r-- | lem/io/tcp.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/lem/io/tcp.c b/lem/io/tcp.c index b11d59b..91ab187 100644 --- a/lem/io/tcp.c +++ b/lem/io/tcp.c @@ -257,19 +257,8 @@ tcp_listen_reap(struct lem_async *a) g->node = "*"; if (sock >= 0) { - struct ev_io *w; - free(g); - - /* create userdata and set the metatable */ - w = lua_newuserdata(T, sizeof(struct ev_io)); - lua_pushvalue(T, 3); - lua_setmetatable(T, -2); - - /* initialize userdata */ - ev_io_init(w, NULL, sock, EV_READ); - w->data = NULL; - + server_new(T, sock, 3); lem_queue(T, 1); return; } |