Skip to content

Commit

Permalink
Some shutdown logging improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Jan 28, 2025
1 parent ae2d5c1 commit ccf814b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Common/Net/HTTPClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand All @@ -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;
}

Expand Down
12 changes: 8 additions & 4 deletions Core/RetroAchievements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit ccf814b

Please sign in to comment.