aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2015-07-09 10:26:30 +0200
committerShauren <shauren.trinity@gmail.com>2015-07-09 10:26:30 +0200
commit1658421403c4f0643732efd25a338ac47a3c32f4 (patch)
treec933e99fbb2b43a89c045eebc79409203613bd0c /src
parent247b031a6f8ca10e07a8cbf18a25c2b2da5404eb (diff)
Core/Battle.net: Only send one IP address for a realm - fixes waiting time to join realm if the wrong address gets picked by the client first (local address for external client)
Closes #14891
Diffstat (limited to 'src')
-rw-r--r--src/server/bnetserver/Server/Session.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/server/bnetserver/Server/Session.cpp b/src/server/bnetserver/Server/Session.cpp
index 822a90b5222..d5ea76c2974 100644
--- a/src/server/bnetserver/Server/Session.cpp
+++ b/src/server/bnetserver/Server/Session.cpp
@@ -521,9 +521,7 @@ void Battlenet::Session::HandleJoinRequestV2(WoWRealm::JoinRequestV2 const& join
LoginDatabase.DirectPExecute("UPDATE account SET sessionkey = '%s', last_ip = '%s', last_login = NOW(), locale = %u, failed_logins = 0, os = '%s' WHERE id = %u",
ByteArrayToHexStr(sessionKey, 40, true).c_str(), GetRemoteIpAddress().to_string().c_str(), GetLocaleByName(_locale), _os.c_str(), _gameAccountInfo->Id);
- joinResponse->IPv4.emplace_back(realm->ExternalAddress, realm->Port);
- if (realm->ExternalAddress != realm->LocalAddress)
- joinResponse->IPv4.emplace_back(realm->LocalAddress, realm->Port);
+ joinResponse->IPv4.push_back(realm->GetAddressForClient(GetRemoteIpAddress()));
AsyncWrite(joinResponse);
}