diff options
author | Alex Borisov <borisov.alexandr@rambler.ru> | 2011-12-05 01:13:18 +0200 |
---|---|---|
committer | Alex Borisov <borisov.alexandr@rambler.ru> | 2011-12-05 01:13:18 +0200 |
commit | 9974bde9106a1d7e05fbe12266d8bbfe00436a62 (patch) | |
tree | f77296246729639ba07a1901172e986f9329bb95 | |
parent | 66732a17595882c9921579f8f22f0e6f307050f4 (diff) |
FIX error when choosing active serv on reconnect
-rw-r--r-- | client/UpdatedConfig.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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(); |