summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/vnc/vncserver.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/base/vnc/vncserver.cc b/src/base/vnc/vncserver.cc
index debf82014..9ca575915 100644
--- a/src/base/vnc/vncserver.cc
+++ b/src/base/vnc/vncserver.cc
@@ -174,6 +174,11 @@ VncServer::listen(int port)
void
VncServer::accept()
{
+ // As a consequence of being called from the PollQueue, we might
+ // have been called from a different thread. Migrate to "our"
+ // thread.
+ EventQueue::ScopedMigration migrate(eventQueue());
+
if (!listener.islistening())
panic("%s: cannot accept a connection if not listening!", name());