From fbafc957dc4e9cdc83aceb2762c0b07296b1a3e6 Mon Sep 17 00:00:00 2001 From: Daan Hoogland Date: Tue, 10 Feb 2015 14:34:20 +0100 Subject: [PATCH] CLOUDSTACK-8238 handling of retry ping improved --- .../src/com/cloud/agent/manager/DirectAgentAttache.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/orchestration/src/com/cloud/agent/manager/DirectAgentAttache.java b/engine/orchestration/src/com/cloud/agent/manager/DirectAgentAttache.java index f3459d88c7d..69ac5eba33d 100755 --- a/engine/orchestration/src/com/cloud/agent/manager/DirectAgentAttache.java +++ b/engine/orchestration/src/com/cloud/agent/manager/DirectAgentAttache.java @@ -170,9 +170,9 @@ public class DirectAgentAttache extends AgentAttache { ServerResource resource = _resource; if (resource != null) { - PingCommand cmd = null; + PingCommand cmd = resource.getCurrentStatus(_id); int retried = 0; - while ( cmd == null && ++retried < _HostPingRetryCount.value()) + while ( cmd == null && ++retried <= _HostPingRetryCount.value()) { cmd = resource.getCurrentStatus(_id); Thread.sleep(1000*_HostPingRetryTimer.value());