]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Update ev_now after logging is done
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 11 Oct 2019 16:45:36 +0000 (17:45 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 11 Oct 2019 16:45:36 +0000 (17:45 +0100)
src/libserver/protocol.c

index da02eb61bc122e3e68c63ab0cc058465c9cb2d82..0786f4860c7a89a31a98fbe4a385913b68a0b3f6 100644 (file)
@@ -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);