diff options
Diffstat (limited to 'src/tcp.c')
-rw-r--r-- | src/tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -232,7 +232,7 @@ static int meth_close(lua_State *L) | |||
232 | static int meth_listen(lua_State *L) | 232 | static int meth_listen(lua_State *L) |
233 | { | 233 | { |
234 | p_tcp tcp = (p_tcp) aux_checkclass(L, "tcp{master}", 1); | 234 | p_tcp tcp = (p_tcp) aux_checkclass(L, "tcp{master}", 1); |
235 | int backlog = (int) luaL_checknumber(L, 2); | 235 | int backlog = (int) luaL_optnumber(L, 2, 32); |
236 | const char *err = sock_listen(&tcp->sock, backlog); | 236 | const char *err = sock_listen(&tcp->sock, backlog); |
237 | if (err) { | 237 | if (err) { |
238 | lua_pushnil(L); | 238 | lua_pushnil(L); |