diff options
Diffstat (limited to 'win/rfb_win32/SocketManager.cxx')
-rw-r--r-- | win/rfb_win32/SocketManager.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/win/rfb_win32/SocketManager.cxx b/win/rfb_win32/SocketManager.cxx index 8e88b79b..015ba549 100644 --- a/win/rfb_win32/SocketManager.cxx +++ b/win/rfb_win32/SocketManager.cxx @@ -169,9 +169,9 @@ void SocketManager::setDisable(VNCServer* srvr, bool disable) int SocketManager::checkTimeouts() { int timeout = EventManager::checkTimeouts(); - std::map<HANDLE,ListenInfo>::iterator i; - for (i=listeners.begin(); i!=listeners.end(); i++) - soonestTimeout(&timeout, Timer::checkTimeouts()); + int nextTimeout = Timer::checkTimeouts(); + if (nextTimeout >= 0 && nextTimeout < timeout) + timeout = nextTimeout; std::list<network::Socket*> shutdownSocks; std::map<HANDLE,ConnInfo>::iterator j, j_next; |