We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 21d5e97 commit 9cb85ffCopy full SHA for 9cb85ff
src/ngx_http_lua_socket_tcp.c
@@ -874,8 +874,8 @@ ngx_http_lua_socket_tcp_bind(lua_State *L)
874
if (n == 3) {
875
if (!lua_isnumber(L, 3)) {
876
lua_pushnil(L);
877
- lua_pushfstring(L, "expecting port to be a
878
- number but got type: %s", luaL_typename(L, 3));
+ lua_pushfstring(L, "expecting port to be a"
+ "number but got type: %s", luaL_typename(L, 3));
879
return 2;
880
}
881
@@ -897,7 +897,7 @@ ngx_http_lua_socket_tcp_bind(lua_State *L)
897
898
899
if (port > 0) {
900
- ngx_inet_set_port(addr->sockaddr, (in_port_t) port);
+ ngx_inet_set_port(local->sockaddr, (in_port_t) port);
901
902
/* TODO: we may reuse the userdata here */
903
lua_rawseti(L, 1, SOCKET_BIND_INDEX);
0 commit comments