Skip to content

Commit a01d5e9

Browse files
daemon: unix socket checking before creating new
+ unix socket spamming removed Signed-off-by: LUU QUANG MINH <Minh.LuuQuang@vn.bosch.com>
1 parent 8fc4e8e commit a01d5e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/daemon/dlt_daemon_unix_socket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ int dlt_daemon_unix_socket_open(int *sock, char *sock_path, int type, int mask)
145145
addr.sun_family = AF_UNIX;
146146
memcpy(addr.sun_path, sock_path, sizeof(addr.sun_path));
147147

148-
if (unlink(sock_path) != 0) {
148+
if(unlink(sock_path) != 0 && (errno != ENOENT)) {
149149
dlt_vlog(LOG_WARNING, "%s: unlink() failed: %s\n",
150150
__func__, strerror(errno));
151151
}

0 commit comments

Comments
 (0)