From 019affa0360d0236c34a90284d8212c1c8c31e87 Mon Sep 17 00:00:00 2001 From: DarthArgus Date: Sun, 1 Jan 2017 05:17:17 -0600 Subject: [PATCH] this may actually fix it --- .../ConnectionServer/src/shared/ClientConnection.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/engine/server/application/ConnectionServer/src/shared/ClientConnection.cpp b/engine/server/application/ConnectionServer/src/shared/ClientConnection.cpp index 20eb2ac2..eae3be68 100755 --- a/engine/server/application/ConnectionServer/src/shared/ClientConnection.cpp +++ b/engine/server/application/ConnectionServer/src/shared/ClientConnection.cpp @@ -295,7 +295,8 @@ void ClientConnection::handleClientIdMessage(const ClientIdMsg &msg) { WARNING(true, ("suid is %lu session is %s", m_suid, sessionId)); static const std::string sessURL(ConfigConnectionServer::getSessionURL()); - if (result) { + + if (result || sessionId) { if (ConfigConnectionServer::getValidateStationKey() && !sessURL.empty()) { bool cont = false; StationId apiSuid = 0; @@ -316,8 +317,10 @@ void ClientConnection::handleClientIdMessage(const ClientIdMsg &msg) { std::string apiUser = api.getString("user_name"); std::string apiIP = api.getString("ip"); - if (expired == 0) { - if (apiSuid == m_suid && apiIP == clientIP) { + if (apiIP == clientIP && expired == 0) { + if (m_suid == 0) { + m_suid = apiSuid; + cont = true; } }