put the new category at a more appropriate place
This commit is contained in:
parent
ed39d5b27f
commit
b21ac48cdf
2 changed files with 3 additions and 6 deletions
|
@ -124,7 +124,8 @@ public:
|
|||
|
||||
const std::string& termination_reason() const {
|
||||
static const std::string aborted = "aborted";
|
||||
return termination_.empty() ? aborted : termination_;
|
||||
static const std::string not_started = "not started";
|
||||
return started_ ? (termination_.empty() ? aborted : termination_) : not_started;
|
||||
}
|
||||
|
||||
void set_termination_reason(const std::string& reason) {
|
||||
|
|
|
@ -1252,11 +1252,7 @@ void server::process_data_game(const network::connection sock, const config& dat
|
|||
}
|
||||
|
||||
void server::delete_game(std::vector<game>::iterator game_it) {
|
||||
if (game_it->started()) {
|
||||
metrics_.game_terminated(game_it->termination_reason());
|
||||
} else {
|
||||
metrics_.game_terminated("not started");
|
||||
}
|
||||
metrics_.game_terminated(game_it->termination_reason());
|
||||
// Delete the game from the games_and_users_list_.
|
||||
config* const gamelist = games_and_users_list_.child("gamelist");
|
||||
assert(gamelist != NULL);
|
||||
|
|
Loading…
Add table
Reference in a new issue