X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fbatteries%2FNioPeerHandler.java;fp=src%2Fmain%2Fjava%2Forg%2Fldk%2Fbatteries%2FNioPeerHandler.java;h=faca477f599d284539385af23c0d09bde2987b0f;hb=f90e8a7a3964e53cca69a1e5c7e47c768f08adb6;hp=991a6b135fda62468aa3878b1864cf4b1f512fe9;hpb=bfce5a76040b2a849aa181072e49e28038d0f6b4;p=ldk-java diff --git a/src/main/java/org/ldk/batteries/NioPeerHandler.java b/src/main/java/org/ldk/batteries/NioPeerHandler.java index 991a6b13..faca477f 100644 --- a/src/main/java/org/ldk/batteries/NioPeerHandler.java +++ b/src/main/java/org/ldk/batteries/NioPeerHandler.java @@ -98,7 +98,6 @@ public class NioPeerHandler { /** * Constructs a new peer handler, spawning a thread to monitor for socket events. - * The background thread will call the PeerManager's timer_tick_occured() function for you on an appropriate schedule. * * @param manager The LDK PeerManager which connection data will be provided to. * @throws IOException If an internal java.nio error occurs. @@ -108,7 +107,6 @@ public class NioPeerHandler { this.selector = Selector.open(); io_thread = new Thread(() -> { ByteBuffer buf = ByteBuffer.allocate(8192); - long lastTimerTick = System.currentTimeMillis(); while (true) { try { if (IS_ANDROID) { @@ -192,10 +190,6 @@ public class NioPeerHandler { // no need to do anything here with the PeerManager. } } - if (lastTimerTick < System.currentTimeMillis() - 30 * 1000) { - peer_manager.timer_tick_occurred(); - lastTimerTick = System.currentTimeMillis(); - } peer_manager.process_events(); } }, "NioPeerHandler NIO Thread");