aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/http.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/libutil/http.c b/src/libutil/http.c
index df710ac42..b46009794 100644
--- a/src/libutil/http.c
+++ b/src/libutil/http.c
@@ -1198,20 +1198,19 @@ rspamd_http_event_handler (int fd, short what, gpointer ud)
}
else if (r == 0) {
/* We can still call http parser */
- if (http_parser_execute (&priv->parser, &priv->parser_cb, d, r)
- != (size_t)r) {
- if (!conn->finished) {
- err = g_error_new (HTTP_ERROR,
- errno,
- "IO read error: unexpected EOF");
- conn->error_handler (conn, err);
- g_error_free (err);
- }
- REF_RELEASE (pbuf);
- rspamd_http_connection_unref (conn);
+ http_parser_execute (&priv->parser, &priv->parser_cb, d, r);
- return;
+ if (!conn->finished) {
+ err = g_error_new (HTTP_ERROR,
+ errno,
+ "IO read error: unexpected EOF");
+ conn->error_handler (conn, err);
+ g_error_free (err);
}
+ REF_RELEASE (pbuf);
+ rspamd_http_connection_unref (conn);
+
+ return;
}
else {
if (!priv->ssl) {