Skip to content

Commit c4c9e51

Browse files
committed
change: better error when request context couldn't be found.
1 parent b80e2bd commit c4c9e51

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/ngx_http_lua_socket_tcp.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1627,13 +1627,7 @@ ngx_http_lua_ffi_socket_tcp_tlshandshake(ngx_http_request_t *r,
16271627

16281628
ctx = ngx_http_get_module_ctx(r, ngx_http_lua_module);
16291629
if (ctx == NULL) {
1630-
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
1631-
"no ngx_lua ctx found while TLS handshaking");
1632-
1633-
ngx_http_lua_assert(NULL);
1634-
1635-
*errmsg = "no ctx found";
1636-
return NGX_ERROR;
1630+
return NGX_HTTP_LUA_FFI_NO_REQ_CTX;
16371631
}
16381632

16391633
coctx = ctx->cur_co_ctx;

0 commit comments

Comments
 (0)