diff --git a/api/peer_connection_proxy.h b/api/peer_connection_proxy.h index 5c1d4b768a..43802f11e7 100644 --- a/api/peer_connection_proxy.h +++ b/api/peer_connection_proxy.h @@ -133,9 +133,11 @@ PROXY_METHOD1(bool, RemoveIceCandidates, const std::vector&) PROXY_METHOD1(RTCError, SetBitrate, const BitrateSettings&) PROXY_METHOD1(void, SetAudioPlayout, bool) PROXY_METHOD1(void, SetAudioRecording, bool) -PROXY_METHOD1(rtc::scoped_refptr, - LookupDtlsTransportByMid, - const std::string&) +// This method will be invoked on the network thread. See +// PeerConnectionFactory::CreatePeerConnectionOrError for more details. +PROXY_WORKER_METHOD1(rtc::scoped_refptr, + LookupDtlsTransportByMid, + const std::string&) // This method will be invoked on the network thread. See // PeerConnectionFactory::CreatePeerConnectionOrError for more details. PROXY_WORKER_CONSTMETHOD0(rtc::scoped_refptr, diff --git a/pc/peer_connection.cc b/pc/peer_connection.cc index a340f9845d..1766bf5163 100644 --- a/pc/peer_connection.cc +++ b/pc/peer_connection.cc @@ -1629,8 +1629,7 @@ void PeerConnection::StopRtcEventLog() { rtc::scoped_refptr PeerConnection::LookupDtlsTransportByMid(const std::string& mid) { - RTC_DCHECK_RUN_ON(signaling_thread()); - // TODO(tommi): Move to the network thread - this hides an invoke. + RTC_DCHECK_RUN_ON(network_thread()); return transport_controller_->LookupDtlsTransportByMid(mid); }