aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-21 14:53:13 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-22 10:57:29 +0100
commit5bbe6638e192dec79d9d73dd890fd5ea2cb03df4 (patch)
tree2980c3df08dd84fd42ede0e7146a2bb8491a81a6
parentcc70ba59d242600a7275cbe1cad2ae1e1c0303ec (diff)
downloadrspamd-5bbe6638e192dec79d9d73dd890fd5ea2cb03df4.tar.gz
rspamd-5bbe6638e192dec79d9d73dd890fd5ea2cb03df4.zip
[Minor] Fix control handler
-rw-r--r--src/libserver/rspamd_control.c1
-rw-r--r--src/rspamadm/control.c2
2 files changed, 2 insertions, 1 deletions
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