1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-01 16:32:08 +01:00

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.
This commit is contained in:
Florian Schmaus 2019-06-03 09:28:52 +02:00
parent 027cae3bd0
commit 4334ca33ff

View file

@ -150,6 +150,7 @@ public class SmackReactor {
Date releaseTimeDate = new Date(releaseTimeEpoch); Date releaseTimeDate = new Date(releaseTimeEpoch);
ScheduledAction scheduledAction = new ScheduledAction(runnable, releaseTimeDate, this); ScheduledAction scheduledAction = new ScheduledAction(runnable, releaseTimeDate, this);
scheduledActions.add(scheduledAction); scheduledActions.add(scheduledAction);
selector.wakeup();
return scheduledAction; return scheduledAction;
} }