diff options
author | Patric Stout <truebrain@openttd.org> | 2021-05-11 19:19:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-11 19:19:37 +0200 |
commit | d0eb3e4bc4904c64667efd791b24846d9ac3c741 (patch) | |
tree | 4cb39e841cd2fd869123b74a742231884b2282c6 | |
parent | 0968d009c8b4ec5b3f5d84000f2f9f5636f9198a (diff) | |
download | openttd-d0eb3e4bc4904c64667efd791b24846d9ac3c741.tar.xz |
Fix: [Network] mark server as offline when no longer reachable (#9244)
-rw-r--r-- | src/network/network.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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; |