From: Igor Sysoev Date: Tue, 24 Jul 2007 18:08:04 +0000 (+0000) Subject: fix case when client has closed connection but upstream buffer is not empty X-Git-Tag: release-0.6.6~8 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=1931d87cca802b6a043e95e6d8d7a1de3a2a0628;p=nginx.git fix case when client has closed connection but upstream buffer is not empty --- diff --git a/src/mail/ngx_mail_proxy_module.c b/src/mail/ngx_mail_proxy_module.c index 894c01d04..ae2fc4c38 100644 --- a/src/mail/ngx_mail_proxy_module.c +++ b/src/mail/ngx_mail_proxy_module.c @@ -866,9 +866,11 @@ ngx_mail_proxy_handler(ngx_event_t *ev) c->log->action = "proxying"; - if ((s->connection->read->eof || s->proxy->upstream.connection->read->eof) - && s->buffer->pos == s->buffer->last - && s->proxy->buffer->pos == s->proxy->buffer->last) + if ((s->connection->read->eof && s->buffer->pos == s->buffer->last) + || (s->proxy->upstream.connection->read->eof + && s->proxy->buffer->pos == s->proxy->buffer->last) + || (s->connection->read->eof + && s->proxy->upstream.connection->read->eof)) { action = c->log->action; c->log->action = NULL;