Skip to content

Commit edd1b6a

Browse files
bugfix: fixed typo.
1 parent b328ac1 commit edd1b6a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ngx_http_lua_socket_tcp.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,7 @@ ngx_http_lua_socket_tcp_connect_helper(lua_State *L,
853853
static int
854854
ngx_http_lua_socket_tcp_bind(lua_State *L)
855855
{
856+
int port;
856857
ngx_http_request_t *r;
857858
ngx_http_lua_ctx_t *ctx;
858859
int n;
@@ -1169,8 +1170,10 @@ ngx_http_lua_socket_tcp_connect(lua_State *L)
11691170
lua_rawgeti(L, 1, SOCKET_BIND_INDEX);
11701171
local = lua_touserdata(L, -1);
11711172

1172-
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
1173-
"lua tcp socket sock:connect ip: %V", &local->name);
1173+
if (local != NULL) {
1174+
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
1175+
"lua tcp socket sock:connect ip: %V", &local->name);
1176+
}
11741177

11751178
lua_pop(L, 1);
11761179

0 commit comments

Comments
 (0)