communicate when ServerPingTask succeeds/fails

This commit is contained in:
iTrooz 2024-11-25 00:10:17 +01:00
parent 9ce5eaaa0c
commit 0c6f78dee2
No known key found for this signature in database
GPG Key ID: 8B83F77667B1BC6A

View File

@ -150,8 +150,10 @@ class ServerPingTask : public Task {
int online = client.getOnlinePlayers();
qDebug() << "Online players: " << online;
m_server.m_currentPlayers = online;
emitSucceeded();
} catch(const Exception& e) {
qDebug() << "Failed to get online players: " << e.cause();
emitFailed(e.cause());
}
});
resolver->ping();