summaryrefslogtreecommitdiff
path: root/src/syncevo/EDSClient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/syncevo/EDSClient.cpp')
-rw-r--r--src/syncevo/EDSClient.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/syncevo/EDSClient.cpp b/src/syncevo/EDSClient.cpp
index 3077d9e7..ad140c87 100644
--- a/src/syncevo/EDSClient.cpp
+++ b/src/syncevo/EDSClient.cpp
@@ -77,7 +77,12 @@ ESourceRegistryCXX EDSRegistryLoader::sync()
if (m_gerror) {
m_gerror.throwError("creating source registry");
}
- g_main_context_iteration(NULL, true);
+ // Only master thread can drive the event processing.
+ if (g_main_context_is_owner(g_main_context_default())) {
+ g_main_context_iteration(NULL, true);
+ } else {
+ Sleep(0.1);
+ }
}
}