mirror of
https://github.com/nginx/nginx.git
synced 2024-12-12 02:09:04 +08:00
Mail: fixed ngx_mail_send() (ticket #519).
This commit is contained in:
parent
3183d7e17b
commit
e042fc9038
@ -559,8 +559,13 @@ ngx_mail_send(ngx_event_t *wev)
|
|||||||
n = c->send(c, s->out.data, s->out.len);
|
n = c->send(c, s->out.data, s->out.len);
|
||||||
|
|
||||||
if (n > 0) {
|
if (n > 0) {
|
||||||
|
s->out.data += n;
|
||||||
s->out.len -= n;
|
s->out.len -= n;
|
||||||
|
|
||||||
|
if (s->out.len != 0) {
|
||||||
|
goto again;
|
||||||
|
}
|
||||||
|
|
||||||
if (wev->timer_set) {
|
if (wev->timer_set) {
|
||||||
ngx_del_timer(wev);
|
ngx_del_timer(wev);
|
||||||
}
|
}
|
||||||
@ -584,6 +589,8 @@ ngx_mail_send(ngx_event_t *wev)
|
|||||||
|
|
||||||
/* n == NGX_AGAIN */
|
/* n == NGX_AGAIN */
|
||||||
|
|
||||||
|
again:
|
||||||
|
|
||||||
cscf = ngx_mail_get_module_srv_conf(s, ngx_mail_core_module);
|
cscf = ngx_mail_get_module_srv_conf(s, ngx_mail_core_module);
|
||||||
|
|
||||||
ngx_add_timer(c->write, cscf->timeout);
|
ngx_add_timer(c->write, cscf->timeout);
|
||||||
|
Loading…
Reference in New Issue
Block a user