From c6435ea02bb43e8f5285c5966283cbbf92e23f4e Mon Sep 17 00:00:00 2001 From: Yaniv Kamay Date: Sat, 26 Dec 2009 17:00:15 +0200 Subject: [PATCH] client: wait for disconnect state in RedClient::connect() --- client/red_client.cpp | 9 +++++++-- 1 file 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));