Mercurial > hg > nginx
comparison src/mail/ngx_mail_proxy_module.c @ 1342:be2e13691c60
fix case when client has closed connection but upstream buffer is not empty
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 24 Jul 2007 18:08:04 +0000 |
parents | bde5e4134759 |
children | f69493e8faab |
comparison
equal
deleted
inserted
replaced
1340:32cdba6f2ec1 | 1342:be2e13691c60 |
---|---|
864 break; | 864 break; |
865 } | 865 } |
866 | 866 |
867 c->log->action = "proxying"; | 867 c->log->action = "proxying"; |
868 | 868 |
869 if ((s->connection->read->eof || s->proxy->upstream.connection->read->eof) | 869 if ((s->connection->read->eof && s->buffer->pos == s->buffer->last) |
870 && s->buffer->pos == s->buffer->last | 870 || (s->proxy->upstream.connection->read->eof |
871 && s->proxy->buffer->pos == s->proxy->buffer->last) | 871 && s->proxy->buffer->pos == s->proxy->buffer->last) |
872 || (s->connection->read->eof | |
873 && s->proxy->upstream.connection->read->eof)) | |
872 { | 874 { |
873 action = c->log->action; | 875 action = c->log->action; |
874 c->log->action = NULL; | 876 c->log->action = NULL; |
875 ngx_log_error(NGX_LOG_INFO, c->log, 0, "proxied session done"); | 877 ngx_log_error(NGX_LOG_INFO, c->log, 0, "proxied session done"); |
876 c->log->action = action; | 878 c->log->action = action; |