aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_writev_chain.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/unix/ngx_writev_chain.c')
-rw-r--r--src/os/unix/ngx_writev_chain.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/src/os/unix/ngx_writev_chain.c b/src/os/unix/ngx_writev_chain.c
index 805982d65..ff16f86e3 100644
--- a/src/os/unix/ngx_writev_chain.c
+++ b/src/os/unix/ngx_writev_chain.c
@@ -143,29 +143,7 @@ ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
c->sent += sent;
- for (cl = in; cl; cl = cl->next) {
-
- if (ngx_buf_special(cl->buf)) {
- continue;
- }
-
- if (sent == 0) {
- break;
- }
-
- size = cl->buf->last - cl->buf->pos;
-
- if (sent >= size) {
- sent -= size;
- cl->buf->pos = cl->buf->last;
-
- continue;
- }
-
- cl->buf->pos += sent;
-
- break;
- }
+ cl = ngx_handle_sent_chain(in, sent);
if (eintr) {
continue;