fix case when client has closed connection but upstream buffer is not empty

This commit is contained in:
Igor Sysoev 2007-07-24 18:08:04 +00:00
parent 32b787560a
commit 1931d87cca

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;