diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2022-01-05 10:00:17 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2022-01-05 10:00:17 +0000 |
commit | 3b0e294c489334153de206452b4319558343e8d5 (patch) | |
tree | 77a73d53b000ba86305c455e582901ed07f39bac /contrib/librdns/util.c | |
parent | 5abc2e4b45134c79bc4989744261ccb00675be56 (diff) | |
download | rspamd-3b0e294c489334153de206452b4319558343e8d5.tar.gz rspamd-3b0e294c489334153de206452b4319558343e8d5.zip |
[Project] Rdns: Add timeout logic for TCP requests
Diffstat (limited to 'contrib/librdns/util.c')
-rw-r--r-- | contrib/librdns/util.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/librdns/util.c b/contrib/librdns/util.c index 9ced3ebd4..b7e1a2011 100644 --- a/contrib/librdns/util.c +++ b/contrib/librdns/util.c @@ -643,6 +643,12 @@ rdns_request_unschedule (struct rdns_request *req) req->async_event = NULL; } } + else if (req->state == RDNS_REQUEST_TCP) { + req->async->del_timer(req->async->data, + req->async_event); + + req->async_event = NULL; + } } void |