From c269b90db21b232f15cff748d68b2d91f2f6555f Mon Sep 17 00:00:00 2001 From: "alexeypa@chromium.org" Date: Sat, 18 Feb 2012 01:31:40 +0000 Subject: Dump Xmpp connection error code to the log to facilitate debugging. BUG=113435 Review URL: http://codereview.chromium.org/9424007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122659 0039d316-1c4b-4281-b951-d872f2087c98 --- remoting/jingle_glue/xmpp_signal_strategy.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'remoting') diff --git a/remoting/jingle_glue/xmpp_signal_strategy.cc b/remoting/jingle_glue/xmpp_signal_strategy.cc index 2df898e..d58a093 100644 --- a/remoting/jingle_glue/xmpp_signal_strategy.cc +++ b/remoting/jingle_glue/xmpp_signal_strategy.cc @@ -152,6 +152,12 @@ void XmppSignalStrategy::OnConnectionStateChanged( if (state == buzz::XmppEngine::STATE_OPEN) { SetState(CONNECTED); } else if (state == buzz::XmppEngine::STATE_CLOSED) { + // Make sure we dump errors to the log. + int subcode; + buzz::XmppEngine::Error error = xmpp_client_->GetError(&subcode); + LOG(INFO) << "XMPP connection was closed: error=" << error + << ", subcode=" << subcode; + // Client is destroyed by the TaskRunner after the client is // closed. Reset the pointer so we don't try to use it later. xmpp_client_ = NULL; -- cgit v1.1