diff --git a/daemon/poller.c b/daemon/poller.c index 6bce14fc1..20478d3c7 100644 --- a/daemon/poller.c +++ b/daemon/poller.c @@ -526,7 +526,10 @@ void poller_timer_loop(void *d) { now: gettimeofday(&rtpe_now, NULL); - if (rtpe_redis_write && (rtpe_redis_write->async_last + rtpe_config.redis_delete_async_interval <= rtpe_now.tv_sec)) { + if (rtpe_redis_write && rtpe_redis_write->async_ev && + (rtpe_redis_write->async_last + rtpe_config.redis_delete_async_interval + <= rtpe_now.tv_sec)) + { redis_async_event_base_action(rtpe_redis_write, EVENT_BASE_LOOPBREAK); rtpe_redis_write->async_last = rtpe_now.tv_sec; }