aboutsummaryrefslogtreecommitdiff
path: root/src/tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tcp.c')
-rw-r--r--src/tcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tcp.c b/src/tcp.c
index cbfebdb..1f51b22 100644
--- a/src/tcp.c
+++ b/src/tcp.c
@@ -232,7 +232,7 @@ static int meth_close(lua_State *L)
232static int meth_listen(lua_State *L) 232static 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);