r1343 merge:

fix case when client has closed connection but upstream buffer is not empty
This commit is contained in:
Igor Sysoev 2007-07-29 17:29:06 +00:00
parent 988bede80f
commit 42c91afe85
1 changed files with 5 additions and 3 deletions

View File

@ -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;