Index: webrtc/p2p/base/port.cc |
diff --git a/webrtc/p2p/base/port.cc b/webrtc/p2p/base/port.cc |
index 7993cc02bc082819340ca1e80b974dd91716f995..c6101a53f87a1e5be2dd9809048d193acb729c64 100644 |
--- a/webrtc/p2p/base/port.cc |
+++ b/webrtc/p2p/base/port.cc |
@@ -20,6 +20,7 @@ |
#include "webrtc/base/helpers.h" |
#include "webrtc/base/logging.h" |
#include "webrtc/base/messagedigest.h" |
+#include "webrtc/base/network.h" |
#include "webrtc/base/scoped_ptr.h" |
#include "webrtc/base/stringencode.h" |
#include "webrtc/base/stringutils.h" |
@@ -195,6 +196,7 @@ void Port::Construct() { |
ice_username_fragment_ = rtc::CreateRandomString(ICE_UFRAG_LENGTH); |
password_ = rtc::CreateRandomString(ICE_PWD_LENGTH); |
} |
+ network_->SignalInactive.connect(this, &Port::OnNetworkInactive); |
LOG_J(LS_INFO, this) << "Port created"; |
} |
@@ -628,6 +630,11 @@ void Port::OnMessage(rtc::Message *pmsg) { |
} |
} |
+void Port::OnNetworkInactive(const rtc::Network* network) { |
+ ASSERT(network == network_); |
+ SignalNetworkInactive(this); |
+} |
+ |
std::string Port::ToString() const { |
std::stringstream ss; |
ss << "Port[" << content_name_ << ":" << component_ |