mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
Reduced difference between the send chain functions.
No functional changes. This follows the change from ad137a80919f.
This commit is contained in:
parent
0a02bdb249
commit
1cbeabfd4c
@ -138,7 +138,7 @@ ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
|
|||||||
|
|
||||||
c->sent += sent;
|
c->sent += sent;
|
||||||
|
|
||||||
cl = ngx_handle_sent_chain(in, sent);
|
in = ngx_handle_sent_chain(in, sent);
|
||||||
|
|
||||||
if (eintr) {
|
if (eintr) {
|
||||||
continue;
|
continue;
|
||||||
@ -146,13 +146,11 @@ ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
|
|||||||
|
|
||||||
if (send - prev_send != sent) {
|
if (send - prev_send != sent) {
|
||||||
wev->ready = 0;
|
wev->ready = 0;
|
||||||
return cl;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (send >= limit || cl == NULL) {
|
if (send >= limit || in == NULL) {
|
||||||
return cl;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
in = cl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -113,18 +113,16 @@ ngx_wsasend_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
|
|||||||
|
|
||||||
c->sent += sent;
|
c->sent += sent;
|
||||||
|
|
||||||
cl = ngx_handle_sent_chain(in, sent);
|
in = ngx_handle_sent_chain(in, sent);
|
||||||
|
|
||||||
if (send - prev_send != sent) {
|
if (send - prev_send != sent) {
|
||||||
wev->ready = 0;
|
wev->ready = 0;
|
||||||
return cl;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (send >= limit || cl == NULL) {
|
if (send >= limit || in == NULL) {
|
||||||
return cl;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
in = cl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -280,14 +278,14 @@ ngx_overlapped_wsasend_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
|
|||||||
|
|
||||||
c->sent += sent;
|
c->sent += sent;
|
||||||
|
|
||||||
cl = ngx_handle_sent_chain(in, sent);
|
in = ngx_handle_sent_chain(in, sent);
|
||||||
|
|
||||||
if (cl) {
|
if (in) {
|
||||||
wev->ready = 0;
|
wev->ready = 0;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
wev->ready = 1;
|
wev->ready = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return cl;
|
return in;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user