From 214de5be4120760095863f3b0e91617f1c41dbb0 Mon Sep 17 00:00:00 2001 From: Jiri Hruska Date: Wed, 4 Sep 2013 13:37:36 +0200 Subject: [PATCH] Avoid duplicate error message when server closes the connection --- ngx_http_auth_ldap_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ngx_http_auth_ldap_module.c b/ngx_http_auth_ldap_module.c index fabfded..0037102 100644 --- a/ngx_http_auth_ldap_module.c +++ b/ngx_http_auth_ldap_module.c @@ -837,7 +837,7 @@ ngx_http_auth_ldap_sb_close(Sockbuf_IO_Desc *sbiod) ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "ngx_http_auth_ldap_sb_close()"); - if (!c->conn.connection->read->error) { + if (!c->conn.connection->read->error && !c->conn.connection->read->eof) { if (ngx_shutdown_socket(c->conn.connection->fd, SHUT_RDWR) == -1) { ngx_connection_error(c->conn.connection, ngx_socket_errno, ngx_shutdown_socket_n " failed"); ngx_http_auth_ldap_close_connection(c);