Skip to content

Commit 49c2385

Browse files
committed
add ngx_http_lua_ffi_con_bytes_busy
1 parent c5c206f commit 49c2385

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/ngx_http_lua_req_body.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,18 @@ ngx_http_lua_ffi_con_nbusy(ngx_http_request_t *r)
7676
return r->connection->nbusy;
7777
}
7878

79+
unsigned int
80+
ngx_http_lua_ffi_con_bytes_busy(ngx_http_request_t *r)
81+
{
82+
unsigned int total = 0;
83+
ngx_chain_t* chain = r->connection->busy;
84+
while(chain){
85+
total += ngx_buf_size(chain->buf);
86+
chain = chain->next;
87+
}
88+
return total;
89+
}
90+
7991
unsigned int
8092
ngx_http_lua_ffi_bytes_buffered(ngx_http_request_t *r)
8193
{

0 commit comments

Comments
 (0)