Catch exceptions thrown while pruning missing peers.
This commit is contained in:
parent
42ed6c3ded
commit
7b3ed2dcbf
|
@ -115,7 +115,13 @@ public class ClientPresenceManager extends RedisClusterPubSubAdapter<String, Str
|
||||||
|
|
||||||
presenceCluster.useCluster(connection -> connection.sync().sadd(MANAGER_SET_KEY, managerId));
|
presenceCluster.useCluster(connection -> connection.sync().sadd(MANAGER_SET_KEY, managerId));
|
||||||
|
|
||||||
pruneMissingPeersFuture = scheduledExecutorService.scheduleAtFixedRate(this::pruneMissingPeers, new Random().nextInt(PRUNE_PEERS_INTERVAL_SECONDS), PRUNE_PEERS_INTERVAL_SECONDS, TimeUnit.SECONDS);
|
pruneMissingPeersFuture = scheduledExecutorService.scheduleAtFixedRate(() -> {
|
||||||
|
try {
|
||||||
|
pruneMissingPeers();
|
||||||
|
} catch (final Throwable t) {
|
||||||
|
log.warn("Failed to prune missing peers", t);
|
||||||
|
}
|
||||||
|
}, new Random().nextInt(PRUNE_PEERS_INTERVAL_SECONDS), PRUNE_PEERS_INTERVAL_SECONDS, TimeUnit.SECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue