aboutgitcodebugslistschat
path: root/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'log.c')
-rw-r--r--log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/log.c b/log.c
index eafaca2..bdd31b4 100644
--- a/log.c
+++ b/log.c
@@ -174,7 +174,7 @@ void passt_vsyslog(int pri, const char *format, va_list ap)
if (log_opt & LOG_PERROR)
fprintf(stderr, "%s", buf + prefix_len);
- if (send(log_sock, buf, n, 0) != n)
+ if (log_sock >= 0 && send(log_sock, buf, n, 0) != n)
fprintf(stderr, "Failed to send %i bytes to syslog\n", n);
}