summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-08 21:49:17 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-08 21:49:17 +0000
commit5c49cfcb1f78f99ece4fe1c1d97e816a576acb9c (patch)
treed9b0f27f274f60e4768098bd7d7b9272d6edf600 /remoting
parent3d5aed9d1255c39f826d26d7e795d5ac3c49223f (diff)
downloadchromium_src-5c49cfcb1f78f99ece4fe1c1d97e816a576acb9c.zip
chromium_src-5c49cfcb1f78f99ece4fe1c1d97e816a576acb9c.tar.gz
chromium_src-5c49cfcb1f78f99ece4fe1c1d97e816a576acb9c.tar.bz2
Abort XmppClient when disconnecting.
BUG=94105 TEST=Chromoting host doesn't crash when canceling connection. Review URL: http://codereview.chromium.org/7859002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100262 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/jingle_glue/xmpp_signal_strategy.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/remoting/jingle_glue/xmpp_signal_strategy.cc b/remoting/jingle_glue/xmpp_signal_strategy.cc
index f1e399b..d4bf481 100644
--- a/remoting/jingle_glue/xmpp_signal_strategy.cc
+++ b/remoting/jingle_glue/xmpp_signal_strategy.cc
@@ -60,9 +60,16 @@ void XmppSignalStrategy::Init(StatusObserver* observer) {
void XmppSignalStrategy::Close() {
if (xmpp_client_) {
xmpp_client_->engine()->RemoveStanzaHandler(this);
+
+ // TODO(sergeyu): XmppClient::Disconnect() should call
+ // Abort(). Remove this line when it's fixed in libjingle.
+ xmpp_client_->Abort();
+
xmpp_client_->Disconnect();
- // Client is deleted by TaskRunner.
- xmpp_client_ = NULL;
+
+ // |xmpp_client_| should be set to NULL in OnConnectionStateChanged()
+ // in response to Disconnect() call above.
+ DCHECK(xmpp_client_ == NULL);
}
}