1
0
Fork 0

Fix: don't do a network disconnect between two queries

This meant that on opening the Multiplayer window, if you had more
than one server configured, it would one by one cancel all pending
queries and send a new. Result: only the last server was updated.
pull/9217/head
Patric Stout 2021-05-08 14:50:56 +02:00 committed by Patric Stout
parent 1b75a29d12
commit fc91f1d1b2
1 changed files with 0 additions and 6 deletions

View File

@ -628,11 +628,6 @@ private:
public: public:
TCPQueryConnecter(const std::string &connection_string, bool request_company_info) : TCPConnecter(connection_string, NETWORK_DEFAULT_PORT), request_company_info(request_company_info), connection_string(connection_string) {} TCPQueryConnecter(const std::string &connection_string, bool request_company_info) : TCPConnecter(connection_string, NETWORK_DEFAULT_PORT), request_company_info(request_company_info), connection_string(connection_string) {}
void OnFailure() override
{
NetworkDisconnect();
}
void OnConnect(SOCKET s) override void OnConnect(SOCKET s) override
{ {
_networking = true; _networking = true;
@ -650,7 +645,6 @@ void NetworkTCPQueryServer(const std::string &connection_string, bool request_co
{ {
if (!_network_available) return; if (!_network_available) return;
NetworkDisconnect();
NetworkInitialize(); NetworkInitialize();
new TCPQueryConnecter(connection_string, request_company_info); new TCPQueryConnecter(connection_string, request_company_info);