]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix control handler
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 21 Jun 2019 13:53:13 +0000 (14:53 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 22 Jun 2019 09:57:29 +0000 (10:57 +0100)
src/libserver/rspamd_control.c
src/rspamadm/control.c

index 257c743ace1b2094e6fb18c57767e63237d962c1..59d1e42346fc24fb49aadc3b9d563b0f410bc0bc 100644 (file)
@@ -524,6 +524,7 @@ rspamd_control_process_client_socket (struct rspamd_main *rspamd_main,
                        0);
        session->rspamd_main = rspamd_main;
        session->addr = addr;
+       session->event_loop = rspamd_main->event_loop;
        rspamd_http_connection_read_message (session->conn, session,
                        io_timeout);
 }
index 0aa995abf838198da27b8feed5f486322167bcb7..2cc783c66d53a4e3a0df1a7d5f047fe87e5d3dd1 100644 (file)
@@ -98,7 +98,7 @@ static void
 rspamd_control_error_handler (struct rspamd_http_connection *conn, GError *err)
 {
        rspamd_fprintf (stderr, "Cannot make HTTP request: %e\n", err);
-       rspamd_http_connection_unref (conn);
+       ev_break (rspamd_main->event_loop, EVBREAK_ALL);
 }
 
 static gint