]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Turn off read polling on finished connection.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 19 Jul 2014 16:41:30 +0000 (09:41 -0700)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 19 Jul 2014 16:41:30 +0000 (09:41 -0700)
src/libutil/http.c

index fe3c11feaeead61683985b78838249a4871ebf75..420dd165ca3df6c316eaff394a5c40b248895fab 100644 (file)
@@ -525,6 +525,11 @@ rspamd_http_on_message_complete (http_parser* parser)
                ret = conn->finish_handler (conn, priv->msg);
                conn->finished = TRUE;
                rspamd_http_connection_unref (conn);
+
+               /* Disable reading if we have read an HTTP message */
+               if (event_pending (&priv->ev, EV_READ, NULL)) {
+                       event_del (&priv->ev);
+               }
        }
 
        return ret;