commit 5bbe663: [Minor] Fix control handler
Vsevolod Stakhov
vsevolod at highsecure.ru
Sat Jun 22 12:14:54 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-06-21 14:53:13 +0100
URL: https://github.com/rspamd/rspamd/commit/5bbe6638e192dec79d9d73dd890fd5ea2cb03df4
[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
More information about the Commits
mailing list