[Java] Stop processing net before we stop the background processor
[ldk-java] / src / main / java / org / ldk / batteries / ChannelManagerConstructor.java
index 7399ccb3fb18ffae950ca9e1ed445212dad88890..d64c0d6e60d063c53b8dbad808a479e81a981f7d 100644 (file)
@@ -207,7 +207,7 @@ assert this.payer != null;
      * Interrupt the background thread, stopping the background handling of events.
      */
     public void interrupt() {
-        this.background_processor.stop();
         this.nio_peer_handler.interrupt();
+        this.background_processor.stop();
     }
 }