diff --git a/pc/peer_connection_end_to_end_unittest.cc b/pc/peer_connection_end_to_end_unittest.cc index 4ef4c832bb..a4704c0b7d 100644 --- a/pc/peer_connection_end_to_end_unittest.cc +++ b/pc/peer_connection_end_to_end_unittest.cc @@ -21,6 +21,7 @@ #include "media/sctp/sctp_transport_internal.h" #include "rtc_base/gunit.h" #include "rtc_base/logging.h" +#include "rtc_base/physical_socket_server.h" #ifdef WEBRTC_ANDROID #include "pc/test/android_test_initializer.h" @@ -54,9 +55,9 @@ class PeerConnectionEndToEndBaseTest : public sigslot::has_slots<>, public: typedef std::vector> DataChannelList; - explicit PeerConnectionEndToEndBaseTest(SdpSemantics sdp_semantics) { - network_thread_ = rtc::Thread::CreateWithSocketServer(); - worker_thread_ = rtc::Thread::Create(); + explicit PeerConnectionEndToEndBaseTest(SdpSemantics sdp_semantics) + : network_thread_(std::make_unique(&pss_)), + worker_thread_(rtc::Thread::Create()) { RTC_CHECK(network_thread_->Start()); RTC_CHECK(worker_thread_->Start()); caller_ = new rtc::RefCountedObject( @@ -191,6 +192,7 @@ class PeerConnectionEndToEndBaseTest : public sigslot::has_slots<>, } protected: + rtc::PhysicalSocketServer pss_; std::unique_ptr network_thread_; std::unique_ptr worker_thread_; rtc::scoped_refptr caller_;