diff --git a/server/modules/protocol/httpd.c b/server/modules/protocol/httpd.c index 175e0ad12..f5e347924 100644 --- a/server/modules/protocol/httpd.c +++ b/server/modules/protocol/httpd.c @@ -343,13 +343,14 @@ int n_connect = 0; if (poll_add_dcb(client) == -1) { + close(so); return n_connect; } n_connect++; } } } - close(so); + return n_connect; }