Index: remoting/protocol/jingle_session.cc |
diff --git a/remoting/protocol/jingle_session.cc b/remoting/protocol/jingle_session.cc |
index b510ae8ae434e8974a8212c4bd4f56fb224aa863..746682ce878fe7f99e0f4397d874484813bd5a39 100644 |
--- a/remoting/protocol/jingle_session.cc |
+++ b/remoting/protocol/jingle_session.cc |
@@ -65,8 +65,6 @@ JingleSession::JingleSession( |
} |
JingleSession::~JingleSession() { |
- // Reset the callback so that it's not called from Close(). |
- state_change_callback_.Reset(); |
Close(); |
jingle_session_manager_->SessionDestroyed(this); |
} |
@@ -235,7 +233,8 @@ const std::string& JingleSession::shared_secret() { |
void JingleSession::Close() { |
DCHECK(CalledOnValidThread()); |
- |
+ // Ensure that we won't notify the callback again. |
+ state_change_callback_.Reset(); |
CloseInternal(net::ERR_CONNECTION_CLOSED, false); |
} |