mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
BUG/MINOR: sock: do not double-close the accepted socket on the error path
Coverity found in issue #1646 that I added a double-close bug in last commit e4d09cedb ("MINOR: sock: check configured limits at the sock layer, not the listener's") because the error path already closes the FD. No backport needed.
This commit is contained in:
parent
ce7a5e0967
commit
8f6c0c32b8
@ -104,7 +104,6 @@ struct connection *sock_accept_conn(struct listener *l, int *status)
|
||||
|
||||
if (likely(cfd != -1)) {
|
||||
if (unlikely(cfd >= global.maxsock)) {
|
||||
close(cfd);
|
||||
send_log(p, LOG_EMERG,
|
||||
"Proxy %s reached the configured maximum connection limit. Please check the global 'maxconn' value.\n",
|
||||
p->id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user