diff --git a/src/connector.c b/src/connector.c index 89ba6622..555ede9f 100644 --- a/src/connector.c +++ b/src/connector.c @@ -455,15 +455,14 @@ retry: } buf = recv_unix_msg(sockd); + close(sockd); if (!buf) { - close(sockd); LOGWARNING("Failed to get message in connector_loop"); goto retry; } if (!strncasecmp(buf, "ping", 4)) { LOGDEBUG("Connector received ping request"); send_unix_msg(sockd, "pong"); - close(sockd); goto retry; }