From 5a1da9f9de639114d6ae1ce3e2fb1ee537c70556 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Fri, 21 Sep 2018 16:32:47 +0530 Subject: [PATCH] agent: Fixes #2858 agent LB not working 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 67115e649a1b..1b3526db22de 100644 --- a/agent/src/com/cloud/agent/Agent.java +++ b/agent/src/com/cloud/agent/Agent.java @@ -509,8 +509,8 @@ protected void reconnect(final Link link) { _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 {