Index: remoting/protocol/jingle_session_manager.cc |
diff --git a/remoting/protocol/jingle_session_manager.cc b/remoting/protocol/jingle_session_manager.cc |
index cf85d0f5b4b25b94dd46173c51370bbc556f8471..e1a935daaf485c01bb6e743ee449699705000d5f 100644 |
--- a/remoting/protocol/jingle_session_manager.cc |
+++ b/remoting/protocol/jingle_session_manager.cc |
@@ -38,6 +38,8 @@ JingleSessionManager::JingleSessionManager( |
} |
JingleSessionManager::~JingleSessionManager() { |
+ // Session manager can be destroyed only after all sessions are destroyed. |
+ DCHECK(sessions_.empty()); |
Close(); |
} |
@@ -111,13 +113,9 @@ void JingleSessionManager::Init( |
void JingleSessionManager::Close() { |
DCHECK(CalledOnValidThread()); |
- // Close() can be called only after all sessions are destroyed. |
- DCHECK(sessions_.empty()); |
- |
if (!closed_) { |
cricket_session_manager_->RemoveClient(kChromotingXmlNamespace); |
jingle_signaling_connector_.reset(); |
- cricket_session_manager_.reset(); |
closed_ = true; |
} |
} |