From 4334ca33ffd212c28927d9b36daf0c3f15db5b16 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Mon, 3 Jun 2019 09:28:52 +0200 Subject: [PATCH] Add missing selector.wakeup() in SmackRactor.schedule() Without this, newly scheduled runnables would potentially not be scheduled in case the reactor thread was blocking in select(0) indefinetly. Thanks to Eng ChongMeng for reporting this. --- .../src/main/java/org/jivesoftware/smack/SmackReactor.java | 1 + 1 file changed, 1 insertion(+) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/SmackReactor.java b/smack-core/src/main/java/org/jivesoftware/smack/SmackReactor.java index 443785dba..29e2254a6 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/SmackReactor.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/SmackReactor.java @@ -150,6 +150,7 @@ public class SmackReactor { Date releaseTimeDate = new Date(releaseTimeEpoch); ScheduledAction scheduledAction = new ScheduledAction(runnable, releaseTimeDate, this); scheduledActions.add(scheduledAction); + selector.wakeup(); return scheduledAction; }