summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-03-14 16:58:05 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-03-14 16:58:05 +0300
commit5ebb51418d61f8d69234ee9bb9e6f7ea8051b7b9 (patch)
tree48f68f631e07e8461c14b5a8f3c5bc07a081405f
parentdc073fd7790591430d2b54c033e838a8894c54b6 (diff)
downloadrspamd-5ebb51418d61f8d69234ee9bb9e6f7ea8051b7b9.tar.gz
rspamd-5ebb51418d61f8d69234ee9bb9e6f7ea8051b7b9.zip
Race again.
-rw-r--r--src/plugins/surbl.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/surbl.c b/src/plugins/surbl.c
index b79f21e94..ed7bc28fa 100644
--- a/src/plugins/surbl.c
+++ b/src/plugins/surbl.c
@@ -825,6 +825,7 @@ redirector_callback (gint fd, short what, void *arg)
msg_err ("write failed %s to %s", strerror (errno), param->redirector->name);
upstream_fail (&param->redirector->up, param->task->tv.tv_sec);
remove_normal_event (param->task->s, free_redirector_session, param);
+
param->task->save.saved--;
make_surbl_requests (param->url, param->task, param->suffix, FALSE);
if (param->task->save.saved == 0) {
@@ -841,6 +842,7 @@ redirector_callback (gint fd, short what, void *arg)
param->task->message_id, param->redirector->name);
upstream_fail (&param->redirector->up, param->task->tv.tv_sec);
remove_normal_event (param->task->s, free_redirector_session, param);
+
param->task->save.saved--;
make_surbl_requests (param->url, param->task, param->suffix, FALSE);
if (param->task->save.saved == 0) {
@@ -884,6 +886,9 @@ redirector_callback (gint fd, short what, void *arg)
parse_uri (param->url, memory_pool_strdup (param->task->task_pool, c), param->task->task_pool);
}
}
+ upstream_ok (&param->redirector->up, param->task->tv.tv_sec);
+ remove_normal_event (param->task->s, free_redirector_session, param);
+
param->task->save.saved--;
make_surbl_requests (param->url, param->task, param->suffix, FALSE);
if (param->task->save.saved == 0) {
@@ -891,13 +896,14 @@ redirector_callback (gint fd, short what, void *arg)
param->task->save.saved = 1;
process_filters (param->task);
}
- upstream_ok (&param->redirector->up, param->task->tv.tv_sec);
- remove_normal_event (param->task->s, free_redirector_session, param);
+
}
else {
msg_info ("<%s> reading redirector %s timed out, while waiting for read",
param->redirector->name, param->task->message_id);
upstream_fail (&param->redirector->up, param->task->tv.tv_sec);
+ remove_normal_event (param->task->s, free_redirector_session, param);
+
param->task->save.saved--;
make_surbl_requests (param->url, param->task, param->suffix, FALSE);
if (param->task->save.saved == 0) {
@@ -905,7 +911,6 @@ redirector_callback (gint fd, short what, void *arg)
param->task->save.saved = 1;
process_filters (param->task);
}
- remove_normal_event (param->task->s, free_redirector_session, param);
}
break;
}