Fix: [Network] mark server as offline when no longer reachable (#9244)

This commit is contained in:
Patric Stout 2021-05-11 19:19:37 +02:00 committed by GitHub
parent 0968d009c8
commit d0eb3e4bc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -627,6 +627,14 @@ private:
public:
TCPQueryConnecter(const std::string &connection_string) : TCPConnecter(connection_string, NETWORK_DEFAULT_PORT), connection_string(connection_string) {}
void OnFailure() override
{
NetworkGameList *item = NetworkGameListAddItem(connection_string);
item->online = false;
UpdateNetworkGameWindow();
}
void OnConnect(SOCKET s) override
{
_networking = true;