From 6f1c5551fc577e35b606051be1325c59b05ae52b Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Sat, 22 Sep 2018 14:40:18 +0530 Subject: [PATCH] agent: Fixes #2858 agent LB not working (#2859) This fixes the issue that on reconnection, agent LB feature will fail and only the first ms-host will be tried reconnection again and again. Signed-off-by: Rohit Yadav --- agent/src/com/cloud/agent/Agent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/src/com/cloud/agent/Agent.java b/agent/src/com/cloud/agent/Agent.java index 67115e649a1..1b3526db22d 100644 --- a/agent/src/com/cloud/agent/Agent.java +++ b/agent/src/com/cloud/agent/Agent.java @@ -509,8 +509,8 @@ public class Agent implements HandlerFactory, IAgentControl { _shell.getBackoffAlgorithm().waitBeforeRetry(); } - final String host = _shell.getNextHost(); do { + final String host = _shell.getNextHost(); _connection = new NioClient("Agent", host, _shell.getPort(), _shell.getWorkers(), this); s_logger.info("Reconnecting to host:" + host); try {