From 5bbe6638e192dec79d9d73dd890fd5ea2cb03df4 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 21 Jun 2019 14:53:13 +0100 Subject: [PATCH] [Minor] Fix control handler --- src/libserver/rspamd_control.c | 1 + src/rspamadm/control.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libserver/rspamd_control.c b/src/libserver/rspamd_control.c index 257c743ac..59d1e4234 100644 --- a/src/libserver/rspamd_control.c +++ b/src/libserver/rspamd_control.c @@ -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); } diff --git a/src/rspamadm/control.c b/src/rspamadm/control.c index 0aa995abf..2cc783c66 100644 --- a/src/rspamadm/control.c +++ b/src/rspamadm/control.c @@ -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 -- 2.39.5