From 75580feaa016f9a02e13f950c3a36f493f075535 Mon Sep 17 00:00:00 2001 From: Philippe G Date: Sat, 21 Nov 2020 18:09:41 -0800 Subject: [PATCH] close socket when connect() fails might be linked to "too many CLI connection" but I'm not sure --- components/squeezelite/controls.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/squeezelite/controls.c b/components/squeezelite/controls.c index 508e549d..0860c57e 100644 --- a/components/squeezelite/controls.c +++ b/components/squeezelite/controls.c @@ -279,6 +279,7 @@ static void notify(in_addr_t ip, u16_t hport, u16_t cport) { if (connect(cli_sock, (struct sockaddr *) &addr, addrlen) < 0) { LOG_ERROR("unable to connect to server %s:%hu with cli", inet_ntoa(server_ip), server_cport); + closesocket(cli_sock); cli_sock = -1; }