@@ -632,12 +632,13 @@ public:
TCPQueryConnecter(const std::string &connection_string) : TCPServerConnecter(connection_string, NETWORK_DEFAULT_PORT), connection_string(connection_string) {}
void OnFailure() override
{
NetworkGameList *item = NetworkGameListAddItem(connection_string);
item->status = NGLS_OFFLINE;
item->refreshing = false;
UpdateNetworkGameWindow();
}
void OnConnect(SOCKET s) override
@@ -650,12 +651,16 @@ public:
* @param connection_string the address to query.
*/
void NetworkQueryServer(const std::string &connection_string)
if (!_network_available) return;
/* Mark the entry as refreshing, so the GUI can show the refresh is pending. */
item->refreshing = true;
new TCPQueryConnecter(connection_string);
/**
* Validates an address entered as a string and adds the server to
* the list. If you use this function, the games will be marked