]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Always stop event on connection reset
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 27 Oct 2019 12:21:05 +0000 (12:21 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 27 Oct 2019 12:21:05 +0000 (12:21 +0000)
src/libutil/http_connection.c

index 0762fde810d23974831d10474664c1c1b2e6a280..f7da1ee836aa34768e4338a62890bd17b690c6ee 100644 (file)
@@ -1281,10 +1281,9 @@ rspamd_http_connection_reset (struct rspamd_http_connection *conn)
 
        conn->finished = FALSE;
        /* Clear priv */
+       rspamd_ev_watcher_stop (priv->ctx->event_loop, &priv->ev);
 
        if (!(priv->flags & RSPAMD_HTTP_CONN_FLAG_RESETED)) {
-
-               rspamd_ev_watcher_stop (priv->ctx->event_loop, &priv->ev);
                rspamd_http_parser_reset (conn);
        }