From 9974bde9106a1d7e05fbe12266d8bbfe00436a62 Mon Sep 17 00:00:00 2001 From: Alex Borisov Date: Mon, 5 Dec 2011 01:13:18 +0200 Subject: FIX error when choosing active serv on reconnect --- client/UpdatedConfig.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'client/UpdatedConfig.cpp') diff --git a/client/UpdatedConfig.cpp b/client/UpdatedConfig.cpp index 739210d..d5b4177 100644 --- a/client/UpdatedConfig.cpp +++ b/client/UpdatedConfig.cpp @@ -19,7 +19,8 @@ string UpdatedConfig::GetServerAddr() Logger::Error("No valid server records present!\n"); return string(""); } - return servers[activeSrvIndex].host; + string ret = servers[activeSrvIndex].host; + return ret; } UpdatedConfig::UpdatedConfig() @@ -174,10 +175,10 @@ end: client->Disconnect(); configValid = true; - /* reset retry params and setup timer to fire on next planned update */ + // reset retry params and setup timer to fire on next planned update + // but leave activeSrvIndex as it is, so we will reconnect to the same working serv next time time = 0; updateStatus = 0; - activeSrvIndex = 0; retryFailed = false; configUpdateTimer->stop(); -- cgit v1.2.3