diff options
author | rmsousa@chromium.org <rmsousa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-18 06:51:23 +0000 |
---|---|---|
committer | rmsousa@chromium.org <rmsousa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-18 06:51:23 +0000 |
commit | 521bd582a9c8a7ddd24583f954c6ed23eb3129bc (patch) | |
tree | e4d40d8d76d1443236d9cb6db374f6f6a06d12bb /remoting | |
parent | 148404701d880a8ecd7d6a88cc8a6ef01739409b (diff) | |
download | chromium_src-521bd582a9c8a7ddd24583f954c6ed23eb3129bc.zip chromium_src-521bd582a9c8a7ddd24583f954c6ed23eb3129bc.tar.gz chromium_src-521bd582a9c8a7ddd24583f954c6ed23eb3129bc.tar.bz2 |
Fix DCHECK when asynchronous auth finishes after the connection fails.
BUG=232874
Review URL: https://chromiumcodereview.appspot.com/14205021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194815 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/protocol/jingle_session.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/remoting/protocol/jingle_session.cc b/remoting/protocol/jingle_session.cc index 72985c2..20d3492 100644 --- a/remoting/protocol/jingle_session.cc +++ b/remoting/protocol/jingle_session.cc @@ -554,9 +554,15 @@ bool JingleSession::InitializeConfigFromDescription( void JingleSession::ProcessAuthenticationStep() { DCHECK(CalledOnValidThread()); - DCHECK_EQ(state_, CONNECTED); DCHECK_NE(authenticator_->state(), Authenticator::PROCESSING_MESSAGE); + if (state_ != CONNECTED) { + DCHECK(state_ == FAILED || state_ == CLOSED); + // The remote host closed the connection while the authentication was being + // processed asynchronously, nothing to do. + return; + } + if (authenticator_->state() == Authenticator::MESSAGE_READY) { JingleMessage message(peer_jid_, JingleMessage::SESSION_INFO, session_id_); message.info = authenticator_->GetNextMessage(); |