}
}
else {
- rspamd_fprintf (stderr, "cannot connect to %s\n", connect_str);
- exit (EXIT_FAILURE);
+ rspamd_fprintf (stderr, "cannot connect to %s: %s\n", connect_str,
+ strerror (errno));
+ exit (-errno);
}
g_free (hostbuf);
gint fd;
fd = rspamd_socket (name, port, SOCK_STREAM, TRUE, FALSE, TRUE);
+
if (fd == -1) {
return NULL;
}
}
/* Pass socket ownership */
- rspamd_http_connection_own_socket (conn);
+ rspamd_http_connection_own_socket (conn->http_conn);
conn->server_name = g_string_new (name);
if (port != 0) {