From 52735395c53a5cdf71d79ea9eb299572bf3f7249 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 19 Jul 2014 09:41:30 -0700 Subject: [PATCH] Turn off read polling on finished connection. --- src/libutil/http.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libutil/http.c b/src/libutil/http.c index fe3c11fea..420dd165c 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -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; -- 2.39.5