Skip to content

Commit

Permalink
Add even more debug to friends manager
Browse files Browse the repository at this point in the history
  • Loading branch information
rtm516 committed Jul 4, 2024
1 parent 584b0de commit cc9a9a7
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ public void initAutoFriend(FriendSyncConfig friendSyncConfig) {
// Cleanup any blocked users
cleanupBlocked();

logger.debug("Cleaned up blocked users");

try {
List<FollowerResponse.Person> friends = get();
if (friends.isEmpty()) {
Expand All @@ -224,9 +226,10 @@ public void initAutoFriend(FriendSyncConfig friendSyncConfig) {
remove(person.xuid, person.displayName);
}
}
} catch (XboxFriendsException e) {
} catch (Exception e) {
logger.error("Failed to sync friends", e);
}
logger.debug("Friend sync complete");
}, friendSyncConfig.updateInterval(), friendSyncConfig.updateInterval(), TimeUnit.SECONDS);
}
}
Expand Down Expand Up @@ -465,10 +468,12 @@ private void cleanupBlocked() {
logger.info("Unblocked " + user.xuid() + " as they were blocked previously");
} catch (Exception e) {
// Silently continue
logger.error("Error while unblocking user " + user.xuid(), e);
}
}
} catch (IOException | InterruptedException e) {
// Silently fail as it's not too important if this doesn't work
logger.error("Error while cleaning up blocked users", e);
}
}

Expand Down

0 comments on commit cc9a9a7

Please sign in to comment.