Logging for Failed Respository Connections on Optional Runs

This commit is contained in:
Ice 2025-06-11 15:45:08 -04:00 committed by GitHub
parent 15f793ccb4
commit 92077f2912
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -714,6 +714,7 @@ public class Network {
// We can't block here so use tryRepository(). We don't NEED to connect a new peer.
try (Repository repository = RepositoryManager.tryRepository()) {
if (repository == null) {
LOGGER.warn("Unable to get repository connection : Network.getConnectablePeer()");
return null;
}
@ -1499,6 +1500,7 @@ public class Network {
// Pruning peers isn't critical so no need to block for a repository instance.
try (Repository repository = RepositoryManager.tryRepository()) {
if (repository == null) {
LOGGER.warn("Unable to get repository connection : Network.prunePeers()");
return;
}
@ -1567,6 +1569,7 @@ public class Network {
// Merging peers isn't critical so don't block for a repository instance.
try (Repository repository = RepositoryManager.tryRepository()) {
if (repository == null) {
LOGGER.warn("Unable to get repository connection : Network.opportunisticMergePeers()");
return;
}