From 4fc3551822a57a3b26d0c4540e205f9b340f9899 Mon Sep 17 00:00:00 2001 From: Alex Borisov Date: Sun, 4 Dec 2011 22:38:58 +0200 Subject: FIX reconnection bug & server entry parser --- client/UpdatedConfig.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'client/UpdatedConfig.cpp') diff --git a/client/UpdatedConfig.cpp b/client/UpdatedConfig.cpp index 860042d..9ebae8a 100644 --- a/client/UpdatedConfig.cpp +++ b/client/UpdatedConfig.cpp @@ -35,7 +35,7 @@ UpdatedConfig::UpdatedConfig() return; } - client = new SslClient(QString::fromStdString(servers[0].host)); + client = new SslClient(QString::fromLocal8Bit(servers[0].host.c_str())); connect(client, SIGNAL(ReplyRecieved(SslClient::RequestType&, QByteArray&)), this, SLOT(gotServerReply(SslClient::RequestType&, QByteArray&))); connect(client, SIGNAL(ConnectionError()), @@ -68,6 +68,11 @@ void UpdatedConfig::update() { activeSrvIndex = 0; } + ServerEntry current = servers[activeSrvIndex]; + client->SetServerAddr(QString::fromLocal8Bit(current.host.c_str())); + configUpdateTimer->stop(); + configUpdateTimer->setInterval(current.retryTimeout * 1000); + configUpdateTimer->start(); } retryFailed = false; } -- cgit v1.2.3