aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/buffer.c1
-rw-r--r--src/controller.c3
2 files changed, 2 insertions, 2 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 0985fed10..59dd55d3e 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -258,6 +258,7 @@ write_buffers (gint fd, rspamd_io_dispatcher_t * d, gboolean is_delayed)
event_add (d->ev, d->tv);
return TRUE;
}
+ len = d->out_buffers.pending;
}
if (d->out_buffers.pending == 0) {
diff --git a/src/controller.c b/src/controller.c
index f8335b8ec..6c0480e62 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -235,7 +235,7 @@ restful_write_reply (gint error_code, const gchar *err_message, const gchar *buf
r += rspamd_snprintf (hbuf + r, sizeof (hbuf) - r, CRLF);
if (buf != NULL) {
- if (!rspamd_dispatcher_write (d, hbuf, r, TRUE, FALSE)) {
+ if (!rspamd_dispatcher_write (d, hbuf, r, TRUE, TRUE)) {
return FALSE;
}
return rspamd_dispatcher_write (d, buf, buflen, FALSE, FALSE);
@@ -1353,7 +1353,6 @@ controller_read_socket (f_str_t * in, void *arg)
else if (session->cmd != NULL) {
if (! process_command (session->cmd, NULL, session)) {
msg_debug ("process command failed");
- destroy_session (session->s);
return FALSE;
}
}