#include <rfb/VNCServerST.h>
#include <rfb/Configuration.h>
#include <rfb/SSecurityFactoryStandard.h>
-
+#include <rfb/Timer.h>
#include <network/TcpSocket.h>
#include <tx/TXWindow.h>
}
}
+ Timer::checkTimeouts();
+ server.checkTimeouts();
+
+ // Client list could have been changed.
server.getSockets(&sockets);
// Nothing more to do if there are no client connections.
server.processSocketEvent(*i);
}
- // Don't poll if the desktop object in not ready.
- if (!desktop.isRunning())
- continue;
-
- server.checkTimeouts();
-
- if (sched.goodTimeToPoll()) {
+ if (desktop.isRunning() && sched.goodTimeToPoll()) {
sched.newPass();
desktop.poll();
}