From 5bff64bcd521d80c899254c0a5b030699ce2f2f4 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 11 Oct 2019 17:45:36 +0100 Subject: [Minor] Update ev_now after logging is done --- src/libserver/protocol.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libserver/protocol.c') diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index da02eb61b..0786f4860 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -2013,9 +2013,6 @@ rspamd_protocol_write_reply (struct rspamd_task *task, ev_tstamp timeout) msg->flags |= RSPAMD_HTTP_FLAG_SPAMC; } - ev_now_update (task->event_loop); - msg->date = ev_time (); - if (task->err != NULL) { msg_debug_protocol ("writing error reply to client"); ucl_object_t *top = NULL; @@ -2057,6 +2054,9 @@ rspamd_protocol_write_reply (struct rspamd_task *task, ev_tstamp timeout) } } + ev_now_update (task->event_loop); + msg->date = ev_time (); + rspamd_http_connection_reset (task->http_conn); rspamd_http_connection_write_message (task->http_conn, msg, NULL, ctype, task, timeout); -- cgit v1.2.3