+ if (connect(syslog_fd, &sa.sa, sizeof(sa)) < 0) {
+ close_nointr_nofail(syslog_fd);
+
+ /* Some legacy syslog systems still use stream
+ * sockets. They really shouldn't. But what can we
+ * do... */
+ if ((syslog_fd = create_log_socket(SOCK_STREAM)) < 0) {
+ r = -errno;
+ goto fail;
+ }
+
+ if (connect(syslog_fd, &sa.sa, sizeof(sa)) < 0) {
+ r = -errno;
+ goto fail;
+ }
+
+ syslog_is_stream = true;
+ } else
+ syslog_is_stream = false;
+