From a01d5e961323fdba9b5bb1202e6ff750ef9fd4ff Mon Sep 17 00:00:00 2001 From: LUU QUANG MINH Date: Thu, 27 Jun 2024 17:19:00 +0700 Subject: [PATCH] daemon: unix socket checking before creating new + unix socket spamming removed Signed-off-by: LUU QUANG MINH --- src/daemon/dlt_daemon_unix_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/daemon/dlt_daemon_unix_socket.c b/src/daemon/dlt_daemon_unix_socket.c index 8324e0239..e35f03b5b 100644 --- a/src/daemon/dlt_daemon_unix_socket.c +++ b/src/daemon/dlt_daemon_unix_socket.c @@ -145,7 +145,7 @@ int dlt_daemon_unix_socket_open(int *sock, char *sock_path, int type, int mask) addr.sun_family = AF_UNIX; memcpy(addr.sun_path, sock_path, sizeof(addr.sun_path)); - if (unlink(sock_path) != 0) { + if(unlink(sock_path) != 0 && (errno != ENOENT)) { dlt_vlog(LOG_WARNING, "%s: unlink() failed: %s\n", __func__, strerror(errno)); }