aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/upstream.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/upstream.c')
-rw-r--r--src/libutil/upstream.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libutil/upstream.c b/src/libutil/upstream.c
index 0b7fd0c2f..177731038 100644
--- a/src/libutil/upstream.c
+++ b/src/libutil/upstream.c
@@ -172,7 +172,7 @@ rspamd_upstreams_library_config (struct rspamd_config *cfg,
while (cur) {
upstream = cur->data;
- if (!ev_is_active (&upstream->ev) && upstream->ls &&
+ if (!ev_can_stop (&upstream->ev) && upstream->ls &&
!(upstream->flags & RSPAMD_UPSTREAM_FLAG_NORESOLVE)) {
gdouble when = rspamd_time_jitter (upstream->ls->limits.lazy_resolve_time,
upstream->ls->limits.lazy_resolve_time * .1);
@@ -281,7 +281,7 @@ rspamd_upstream_set_active (struct upstream_list *ls, struct upstream *upstream)
if (upstream->ctx && upstream->ctx->configured &&
!(upstream->flags & RSPAMD_UPSTREAM_FLAG_NORESOLVE)) {
- if (ev_is_active (&upstream->ev)) {
+ if (ev_can_stop (&upstream->ev)) {
ev_timer_stop (upstream->ctx->event_loop, &upstream->ev);
}
/* Start lazy names resolution */
@@ -525,7 +525,7 @@ rspamd_upstream_set_inactive (struct upstream_list *ls, struct upstream *upstrea
ntim = rspamd_time_jitter (ls->limits.revive_time,
ls->limits.revive_jitter);
- if (ev_is_active (&upstream->ev)) {
+ if (ev_can_stop (&upstream->ev)) {
ev_timer_stop (upstream->ctx->event_loop, &upstream->ev);
}
@@ -721,7 +721,7 @@ rspamd_upstream_dtor (struct upstream *up)
if (up->ctx) {
- if (ev_is_active (&up->ev)) {
+ if (ev_can_stop (&up->ev)) {
ev_timer_stop (up->ctx->event_loop, &up->ev);
}
@@ -1030,7 +1030,7 @@ rspamd_upstream_restore_cb (gpointer elt, gpointer ls)
/* Here the upstreams list is already locked */
RSPAMD_UPSTREAM_LOCK (up->lock);
- if (ev_is_active (&up->ev)) {
+ if (ev_can_stop (&up->ev)) {
ev_timer_stop (up->ctx->event_loop, &up->ev);
}