From: Vsevolod Stakhov Date: Sat, 19 Jul 2014 16:41:30 +0000 (-0700) Subject: Turn off read polling on finished connection. X-Git-Tag: 0.7.0~204 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52735395c53a5cdf71d79ea9eb299572bf3f7249;p=thirdparty%2Frspamd.git Turn off read polling on finished connection. --- diff --git a/src/libutil/http.c b/src/libutil/http.c index fe3c11feae..420dd165ca 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;