summaryrefslogtreecommitdiffstats
path: root/src/client/vnc/vncthread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/vnc/vncthread.cpp')
-rw-r--r--src/client/vnc/vncthread.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/vnc/vncthread.cpp b/src/client/vnc/vncthread.cpp
index c9327ad..dfa35af 100644
--- a/src/client/vnc/vncthread.cpp
+++ b/src/client/vnc/vncthread.cpp
@@ -176,10 +176,12 @@ void VncThread::run()
setsockopt(_client->sock, SOL_TCP, TCP_QUICKACK, &one, sizeof(one));
// Main VNC event loop
- emit projectionStarted();
+ if (_run) {
+ _connected = true;
+ emit projectionStarted();
+ }
while (_run)
{
- _connected = true;
const int i = WaitForMessage(_client, 100 * 1000); // wait 100ms for message. returns -1 on error/disconnect, 0 if nothing happened, 1 if new data arrived
if (i < 0)
break;