@@ -128,7 +128,7 @@ static int ngx_http_lua_socket_tcp_conn_op_resume_retval_handler(
128128 ngx_http_request_t * r , ngx_http_lua_socket_tcp_upstream_t * u , lua_State * L );
129129static int ngx_http_lua_socket_tcp_upstream_destroy (lua_State * L );
130130static int ngx_http_lua_socket_downstream_destroy (lua_State * L );
131- static ngx_int_t ngx_http_lua_socket_push_input_data (ngx_http_request_t * r ,
131+ static void ngx_http_lua_socket_push_input_data (ngx_http_request_t * r ,
132132 ngx_http_lua_ctx_t * ctx , ngx_http_lua_socket_tcp_upstream_t * u ,
133133 lua_State * L );
134134static ngx_int_t ngx_http_lua_socket_add_pending_data (ngx_http_request_t * r ,
@@ -3153,7 +3153,6 @@ ngx_http_lua_socket_tcp_receive_retval_handler(ngx_http_request_t *r,
31533153 ngx_http_lua_socket_tcp_upstream_t * u , lua_State * L )
31543154{
31553155 int n ;
3156- ngx_int_t rc ;
31573156 ngx_http_lua_ctx_t * ctx ;
31583157 ngx_event_t * ev ;
31593158
@@ -3200,12 +3199,7 @@ ngx_http_lua_socket_tcp_receive_retval_handler(ngx_http_request_t *r,
32003199 dd ("u->bufs_in: %p" , u -> bufs_in );
32013200
32023201 if (u -> bufs_in ) {
3203- rc = ngx_http_lua_socket_push_input_data (r , ctx , u , L );
3204- if (rc == NGX_ERROR ) {
3205- lua_pushnil (L );
3206- lua_pushliteral (L , "no memory" );
3207- return 2 ;
3208- }
3202+ ngx_http_lua_socket_push_input_data (r , ctx , u , L );
32093203
32103204 (void ) ngx_http_lua_socket_read_error_retval_handler (r , u , L );
32113205
@@ -3219,12 +3213,7 @@ ngx_http_lua_socket_tcp_receive_retval_handler(ngx_http_request_t *r,
32193213 return n + 1 ;
32203214 }
32213215
3222- rc = ngx_http_lua_socket_push_input_data (r , ctx , u , L );
3223- if (rc == NGX_ERROR ) {
3224- lua_pushnil (L );
3225- lua_pushliteral (L , "no memory" );
3226- return 2 ;
3227- }
3216+ ngx_http_lua_socket_push_input_data (r , ctx , u , L );
32283217
32293218 return 1 ;
32303219}
@@ -5908,7 +5897,7 @@ ngx_http_lua_socket_downstream_destroy(lua_State *L)
59085897}
59095898
59105899
5911- static ngx_int_t
5900+ static void
59125901ngx_http_lua_socket_push_input_data (ngx_http_request_t * r ,
59135902 ngx_http_lua_ctx_t * ctx , ngx_http_lua_socket_tcp_upstream_t * u ,
59145903 lua_State * L )
@@ -5980,8 +5969,6 @@ ngx_http_lua_socket_push_input_data(ngx_http_request_t *r,
59805969 u -> buf_in -> buf -> last = u -> buffer .pos ;
59815970 u -> buf_in -> buf -> pos = u -> buffer .pos ;
59825971 }
5983-
5984- return NGX_OK ;
59855972}
59865973
59875974
0 commit comments