commit 425e6f7: [Fix] Fix fuzzy retransmits

Vsevolod Stakhov vsevolod at highsecure.ru
Wed May 12 20:49:05 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-05-12 21:42:24 +0100
URL: https://github.com/rspamd/rspamd/commit/425e6f7e937d104d9e4aef6ba78ad6903782548a (HEAD -> master)

[Fix] Fix fuzzy retransmits

---
 src/plugins/fuzzy_check.c | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c
index bd45fd8d0..722daeacb 100644
--- a/src/plugins/fuzzy_check.c
+++ b/src/plugins/fuzzy_check.c
@@ -2607,9 +2607,21 @@ fuzzy_check_io_callback (gint fd, short what, void *arg)
 				ret = return_want_more;
 			}
 			else {
-				/* It is actually time out */
-				fuzzy_check_timer_callback (fd, what, arg);
-				return;
+				if (what & EV_WRITE) {
+					/* Retransmit attempt */
+					if (!fuzzy_cmd_vector_to_wire (fd, session->commands)) {
+						ret = return_error;
+					}
+					else {
+						session->state = 1;
+						ret = return_want_more;
+					}
+				}
+				else {
+					/* It is actually time out */
+					fuzzy_check_timer_callback(fd, what, arg);
+					return;
+				}
 			}
 			break;
 		case 1:


More information about the Commits mailing list