]> source.dussan.org Git - tigervnc.git/commitdiff
Fixed a problem with QueryConnect dialog not counting down seconds, and
authorConstantin Kaplinsky <const@tightvnc.com>
Wed, 19 Apr 2006 06:13:06 +0000 (06:13 +0000)
committerConstantin Kaplinsky <const@tightvnc.com>
Wed, 19 Apr 2006 06:13:06 +0000 (06:13 +0000)
also fixed an issue with not calling server's checkTimeouts() function
when there are no client connections.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/merge-with-vnc-4.1.1@542 3789f03b-4d11-0410-bbf8-ca57d06f2519

x0vncserver/x0vncserver.cxx

index ae140fb3a23ff65b3fb8db41b07ca83e3b7a8aca..336350d8a917009c2090c74f4f95a855ff499ae9 100644 (file)
@@ -30,7 +30,7 @@
 #include <rfb/VNCServerST.h>
 #include <rfb/Configuration.h>
 #include <rfb/SSecurityFactoryStandard.h>
-
+#include <rfb/Timer.h>
 #include <network/TcpSocket.h>
 #include <tx/TXWindow.h>
 
@@ -510,6 +510,10 @@ int main(int argc, char** argv)
         }
       }
 
+      Timer::checkTimeouts();
+      server.checkTimeouts();
+
+      // Client list could have been changed.
       server.getSockets(&sockets);
 
       // Nothing more to do if there are no client connections.
@@ -522,13 +526,7 @@ int main(int argc, char** argv)
           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();
       }