diff --git a/core/src/main/java/com/google/bitcoin/core/PeerGroup.java b/core/src/main/java/com/google/bitcoin/core/PeerGroup.java index 026f7936..d97cd53a 100644 --- a/core/src/main/java/com/google/bitcoin/core/PeerGroup.java +++ b/core/src/main/java/com/google/bitcoin/core/PeerGroup.java @@ -899,6 +899,8 @@ public class PeerGroup extends AbstractIdleService implements TransactionBroadca return; // Disabled. // Start the process of pinging the peer. Do a ping right now and then ensure there's a fixed delay between // each ping. If the peer is taken out of the peers list then the cycle will stop. + // + // TODO: This should really be done by a timer integrated with the network thread to avoid races. final Runnable[] pingRunnable = new Runnable[1]; pingRunnable[0] = new Runnable() { private boolean firstRun = true;