aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/VNCServerST.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2020-06-18 09:20:17 +0200
committerPierre Ossman <ossman@cendio.se>2020-06-18 09:22:35 +0200
commit38726ce083db1a9227325bf87989513499bfa698 (patch)
treeea7f00b456bdf5aa2dc3a4678bd151c8c8f314e6 /common/rfb/VNCServerST.cxx
parent1ed830ce5f8a2cdac92e975e6d34db3a0162b2ae (diff)
downloadtigervnc-38726ce083db1a9227325bf87989513499bfa698.tar.gz
tigervnc-38726ce083db1a9227325bf87989513499bfa698.zip
Fix non-functional MaxDisconnectionTime
Since 8e09912 this wasn't triggered properly as we checked if all clients were gone before we actually removed the last client from our list.
Diffstat (limited to 'common/rfb/VNCServerST.cxx')
-rw-r--r--common/rfb/VNCServerST.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/rfb/VNCServerST.cxx b/common/rfb/VNCServerST.cxx
index 8329bb23..35f65a2e 100644
--- a/common/rfb/VNCServerST.cxx
+++ b/common/rfb/VNCServerST.cxx
@@ -172,11 +172,6 @@ void VNCServerST::removeSocket(network::Socket* sock) {
clipboardClient = NULL;
clipboardRequestors.remove(*ci);
- // Adjust the exit timers
- connectTimer.stop();
- if (rfb::Server::maxDisconnectionTime && clients.empty())
- disconnectTimer.start(secsToMillis(rfb::Server::maxDisconnectionTime));
-
// - Delete the per-Socket resources
delete *ci;
@@ -193,6 +188,11 @@ void VNCServerST::removeSocket(network::Socket* sock) {
if (comparer)
comparer->logStats();
+ // Adjust the exit timers
+ connectTimer.stop();
+ if (rfb::Server::maxDisconnectionTime && clients.empty())
+ disconnectTimer.start(secsToMillis(rfb::Server::maxDisconnectionTime));
+
return;
}
}