fix save game data timer

This commit is contained in:
Martin Michelsen
2025-07-05 20:27:24 -07:00
parent c9ba61a4b0
commit 22a89deb8b
+2 -1
View File
@@ -261,11 +261,12 @@ void Client::reschedule_save_game_data_timer() {
return; return;
} }
this->save_game_data_timer.expires_after(std::chrono::seconds(60)); this->save_game_data_timer.expires_after(std::chrono::seconds(60));
this->idle_timeout_timer.async_wait([this](std::error_code ec) { this->save_game_data_timer.async_wait([this](std::error_code ec) {
if (!ec) { if (!ec) {
if (this->character(false)) { if (this->character(false)) {
this->save_all(); this->save_all();
} }
this->reschedule_save_game_data_timer();
} }
}); });
} }