Handle wakeup events after pipe has been read.
@@ -481,11 +481,12 @@ FNET_TransportThread::EventLoopIteration() {
// sample current time (performed once per event loop iteration)
_now = steady_clock::now();
- handle_wakeup_events();
-
// handle io-events
_selector.dispatch(*this);
+ // Must be called after selector.dispatch
+ handle_wakeup_events();
+
// handle IOC time-outs
if (getConfig()._iocTimeOut > vespalib::duration::zero()) {
checkTimedoutComponents(getConfig()._iocTimeOut);
