@@ -128,7 +128,7 @@ static int ngx_http_lua_socket_tcp_conn_op_resume_retval_handler(
128
128
ngx_http_request_t * r , ngx_http_lua_socket_tcp_upstream_t * u , lua_State * L );
129
129
static int ngx_http_lua_socket_tcp_upstream_destroy (lua_State * L );
130
130
static 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 ,
132
132
ngx_http_lua_ctx_t * ctx , ngx_http_lua_socket_tcp_upstream_t * u ,
133
133
lua_State * L );
134
134
static 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,
3153
3153
ngx_http_lua_socket_tcp_upstream_t * u , lua_State * L )
3154
3154
{
3155
3155
int n ;
3156
- ngx_int_t rc ;
3157
3156
ngx_http_lua_ctx_t * ctx ;
3158
3157
ngx_event_t * ev ;
3159
3158
@@ -3200,12 +3199,7 @@ ngx_http_lua_socket_tcp_receive_retval_handler(ngx_http_request_t *r,
3200
3199
dd ("u->bufs_in: %p" , u -> bufs_in );
3201
3200
3202
3201
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 );
3209
3203
3210
3204
(void ) ngx_http_lua_socket_read_error_retval_handler (r , u , L );
3211
3205
@@ -3219,12 +3213,7 @@ ngx_http_lua_socket_tcp_receive_retval_handler(ngx_http_request_t *r,
3219
3213
return n + 1 ;
3220
3214
}
3221
3215
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 );
3228
3217
3229
3218
return 1 ;
3230
3219
}
@@ -5908,7 +5897,7 @@ ngx_http_lua_socket_downstream_destroy(lua_State *L)
5908
5897
}
5909
5898
5910
5899
5911
- static ngx_int_t
5900
+ static void
5912
5901
ngx_http_lua_socket_push_input_data (ngx_http_request_t * r ,
5913
5902
ngx_http_lua_ctx_t * ctx , ngx_http_lua_socket_tcp_upstream_t * u ,
5914
5903
lua_State * L )
@@ -5980,8 +5969,6 @@ ngx_http_lua_socket_push_input_data(ngx_http_request_t *r,
5980
5969
u -> buf_in -> buf -> last = u -> buffer .pos ;
5981
5970
u -> buf_in -> buf -> pos = u -> buffer .pos ;
5982
5971
}
5983
-
5984
- return NGX_OK ;
5985
5972
}
5986
5973
5987
5974
0 commit comments