From 521bd582a9c8a7ddd24583f954c6ed23eb3129bc Mon Sep 17 00:00:00 2001 From: "rmsousa@chromium.org" Date: Thu, 18 Apr 2013 06:51:23 +0000 Subject: 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 --- remoting/protocol/jingle_session.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'remoting') 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(); -- cgit v1.1