Skip to content

Commit eed28fc

Browse files
committed
optimize: fixed the pre-allocated number of keys in the 'ngx.socket.tcp' table.
1 parent 6c25b7b commit eed28fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ngx_http_lua_socket_tcp.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ ngx_http_lua_inject_socket_tcp_api(ngx_log_t *log, lua_State *L)
304304
/* {{{tcp object metatable */
305305
lua_pushlightuserdata(L, ngx_http_lua_lightudata_mask(
306306
tcp_socket_metatable_key));
307-
lua_createtable(L, 0 /* narr */, 12 /* nrec */);
307+
lua_createtable(L, 0 /* narr */, 13 /* nrec */);
308308

309309
lua_pushcfunction(L, ngx_http_lua_socket_tcp_connect);
310310
lua_setfield(L, -2, "connect");

0 commit comments

Comments
 (0)