From d0eb3e4bc4904c64667efd791b24846d9ac3c741 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Tue, 11 May 2021 19:19:37 +0200 Subject: Fix: [Network] mark server as offline when no longer reachable (#9244) --- src/network/network.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/network/network.cpp b/src/network/network.cpp index d8f002547..3b43ddbcd 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -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; -- cgit v1.2.3-70-g09d2