diff options
Diffstat (limited to 'common/listener.cpp')
-rw-r--r-- | common/listener.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/common/listener.cpp b/common/listener.cpp index 16da770..6e6808a 100644 --- a/common/listener.cpp +++ b/common/listener.cpp | |||
@@ -114,6 +114,14 @@ void Listener::acceptConnection() | |||
114 | this, &Listener::clientDropped); | 114 | this, &Listener::clientDropped); |
115 | m_checkConnectionsTimer->stop(); | 115 | m_checkConnectionsTimer->stop(); |
116 | 116 | ||
117 | //If this is the first client, set the lower limit for revision cleanup | ||
118 | if (m_connections.size() == 1) { | ||
119 | loadResource(); | ||
120 | if (m_resource) { | ||
121 | m_resource->setLowerBoundRevision(0); | ||
122 | } | ||
123 | } | ||
124 | |||
117 | if (socket->bytesAvailable()) { | 125 | if (socket->bytesAvailable()) { |
118 | readFromSocket(socket); | 126 | readFromSocket(socket); |
119 | } | 127 | } |
@@ -146,6 +154,13 @@ void Listener::clientDropped() | |||
146 | 154 | ||
147 | void Listener::checkConnections() | 155 | void Listener::checkConnections() |
148 | { | 156 | { |
157 | //If this was the last client, disengage the lower limit for revision cleanup | ||
158 | if (m_connections.isEmpty()) { | ||
159 | loadResource(); | ||
160 | if (m_resource) { | ||
161 | m_resource->setLowerBoundRevision(std::numeric_limits<qint64>::max()); | ||
162 | } | ||
163 | } | ||
149 | m_checkConnectionsTimer->start(); | 164 | m_checkConnectionsTimer->start(); |
150 | } | 165 | } |
151 | 166 | ||