In the ENFILE and ENOMEM cases, when accept() fails, an irrelevant
global.maxsock value was printed that doesn't reflect system limits.

Should be backported in all stable branches.
---
 src/sock.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/sock.c b/src/sock.c
index c1e88413f..1bc77c3cb 100644
--- a/src/sock.c
+++ b/src/sock.c
@@ -162,8 +162,8 @@ struct connection *sock_accept_conn(struct listener *l, int 
*status)
        case ENFILE:
                if (p)
                        send_log(p, LOG_EMERG,
-                                "Proxy %s reached system FD limit 
(maxsock=%d). Please check system tunables.\n",
-                                p->id, global.maxsock);
+                                "Proxy %s reached system FD limit. Please 
check system tunables.\n",
+                                p->id);
                ret = CO_AC_PAUSE;
                break;
 
@@ -179,8 +179,8 @@ struct connection *sock_accept_conn(struct listener *l, int 
*status)
        case ENOMEM:
                if (p)
                        send_log(p, LOG_EMERG,
-                                "Proxy %s reached system memory limit 
(maxsock=%d). Please check system tunables.\n",
-                                p->id, global.maxsock);
+                                "Proxy %s reached system memory limit. Please 
check system tunables.\n",
+                                p->id);
                ret = CO_AC_PAUSE;
                break;
 
-- 
Egor Shestakov
egor ascii(0x40) ved1 ascii(0x2E) me



Reply via email to