summaryrefslogtreecommitdiffstats
path: root/client/red_client.cpp
diff options
context:
space:
mode:
authorYaniv Kamay <ykamay@redhat.com>2009-12-26 17:00:15 +0200
committerYaniv Kamay <ykamay@redhat.com>2009-12-28 12:35:54 +0200
commitc6435ea02bb43e8f5285c5966283cbbf92e23f4e (patch)
tree398b51b716f13e621895cb4a694068cfde35e9bf /client/red_client.cpp
parentcced1b1cff4002e2402936ff033ce985668e59e5 (diff)
downloadspice-c6435ea02bb43e8f5285c5966283cbbf92e23f4e.tar.gz
spice-c6435ea02bb43e8f5285c5966283cbbf92e23f4e.tar.xz
spice-c6435ea02bb43e8f5285c5966283cbbf92e23f4e.zip
client: wait for disconnect state in RedClient::connect()
Diffstat (limited to 'client/red_client.cpp')
-rw-r--r--client/red_client.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/client/red_client.cpp b/client/red_client.cpp
index 25fd5c78..bc9e1128 100644
--- a/client/red_client.cpp
+++ b/client/red_client.cpp
@@ -422,10 +422,15 @@ RedPeer::ConnectionOptions::Type RedClient::get_connection_options(uint32_t chan
void RedClient::connect()
{
- //todo wait for disconnect state
- if (_connection_id || !abort_channels()) {
+ if (_connection_id) {
return;
}
+
+ while (!abort_channels()) {
+ _application.process_events_queue();
+ Platform::msleep(100);
+ }
+
_pixmap_cache.clear();
_glz_window.clear();
memset(_sync_info, 0, sizeof(_sync_info));