commit 8035236: [Fix] Do not double call error handler on ssl errors in the timeout path
Vsevolod Stakhov
vsevolod at highsecure.ru
Thu Nov 18 15:49:04 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-11-18 15:45:09 +0000
URL: https://github.com/rspamd/rspamd/commit/8035236f55336a2220f8598719e8dad2f01e3e8b (HEAD -> master)
[Fix] Do not double call error handler on ssl errors in the timeout path
---
src/libserver/http/http_connection.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/libserver/http/http_connection.c b/src/libserver/http/http_connection.c
index a24fe6de6..e3e32eef8 100644
--- a/src/libserver/http/http_connection.c
+++ b/src/libserver/http/http_connection.c
@@ -1056,7 +1056,7 @@ rspamd_http_event_handler (int fd, short what, gpointer ud)
}
}
else if (r == 0) {
- if (!conn->finished) {
+ if (!conn->finished && !priv->ssl) {
err = g_error_new (HTTP_ERROR, 408,
"IO timeout");
conn->error_handler (conn, err);
@@ -1069,10 +1069,12 @@ rspamd_http_event_handler (int fd, short what, gpointer ud)
return;
}
else {
- err = g_error_new (HTTP_ERROR, 408,
- "IO timeout");
- conn->error_handler (conn, err);
- g_error_free (err);
+ if (!priv->ssl) {
+ err = g_error_new(HTTP_ERROR, 408,
+ "IO timeout");
+ conn->error_handler(conn, err);
+ g_error_free(err);
+ }
REF_RELEASE (pbuf);
rspamd_http_connection_unref (conn);
More information about the Commits
mailing list