Some shutdown logging improvements

This commit is contained in:
Henrik Rydgård 2025-01-28 13:25:05 +01:00
parent ae2d5c1b41
commit ccf814bcd0
2 changed files with 10 additions and 6 deletions

View file

@ -159,7 +159,7 @@ bool Connection::Connect(int maxTries, double timeout, bool *cancelConnect) {
selectResult = select(maxfd, nullptr, &fds, nullptr, &tv);
if (cancelConnect && *cancelConnect) {
WARN_LOG(Log::HTTP, "connect: cancelled (1)");
WARN_LOG(Log::HTTP, "connect: cancelled (1): %s:%d", host_.c_str(), port_);
break;
}
}
@ -183,7 +183,7 @@ bool Connection::Connect(int maxTries, double timeout, bool *cancelConnect) {
}
if (cancelConnect && *cancelConnect) {
WARN_LOG(Log::HTTP, "connect: cancelled (2)");
WARN_LOG(Log::HTTP, "connect: cancelled (2): %s:%d", host_.c_str(), port_);
break;
}

View file

@ -746,16 +746,20 @@ void UpdateSettings() {
bool Shutdown() {
g_activeChallenges.clear();
if (g_rcClient) {
#ifdef RC_CLIENT_SUPPORTS_RAINTEGRATION
rc_client_unload_raintegration(g_rcClient);
rc_client_unload_raintegration(g_rcClient);
#endif
rc_client_destroy(g_rcClient);
g_rcClient = nullptr;
INFO_LOG(Log::Achievements, "Achievements shut down.");
rc_client_destroy(g_rcClient);
g_rcClient = nullptr;
INFO_LOG(Log::Achievements, "Achievements shut down.");
}
return true;
}
void ResetRuntime() {
if (!g_rcClient)
return;
INFO_LOG(Log::Achievements, "Resetting rcheevos state...");
rc_client_reset(g_rcClient);
g_activeChallenges.clear();