From 96db78604252eeb17614b9982ced95fd66c6c6fc Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 6 May 2015 16:59:43 +0300 Subject: policy: Fix not incrementing attempts The number of attempts and intervals maybe different causing the attempts to not be incremented properly. --- plugins/policy.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins/policy.c') diff --git a/plugins/policy.c b/plugins/policy.c index 7687203e7..6bb826886 100644 --- a/plugins/policy.c +++ b/plugins/policy.c @@ -683,6 +683,8 @@ static void reconnect_set_timer(struct reconnect_data *reconnect) { static int timeout = 0; + reconnect->attempt++; + if (reconnect->attempt < reconnect_intervals_len) timeout = reconnect_intervals[reconnect->attempt]; -- cgit v1.2.1