diff --git a/rtc_base/physical_socket_server.cc b/rtc_base/physical_socket_server.cc index b5b4443eb4..5cb38ac7a4 100644 --- a/rtc_base/physical_socket_server.cc +++ b/rtc_base/physical_socket_server.cc @@ -1448,6 +1448,8 @@ bool PhysicalSocketServer::WaitSelect(int cmsWait, bool process_io) { if (n < 0) { if (errno != EINTR) { RTC_LOG_E(LS_ERROR, EN, errno) << "select"; + // RingRTC change to log more information around select failures. + RTC_LOG(LS_ERROR) << "select failed: fdmax=" << fdmax << ", cmsWait=" << cmsWait; return false; } // Else ignore the error and keep going. If this EINTR was for one of the diff --git a/rtc_base/thread.cc b/rtc_base/thread.cc index 6f101ac8f4..1470056df3 100644 --- a/rtc_base/thread.cc +++ b/rtc_base/thread.cc @@ -846,8 +846,14 @@ bool Thread::ProcessMessages(int cmsLoop) { ScopedAutoReleasePool pool; #endif absl::AnyInvocable task = Get(cmsNext); - if (!task) - return !IsQuitting(); + // RingRTC change to log more information around select failures. + if (!task) { + bool isQuitting = IsQuitting(); + if (!isQuitting) { + RTC_LOG(LS_ERROR) << name_ << " will stop processing messages. cmsNext=" << cmsNext; + } + return !isQuitting; + } Dispatch(std::move(task)); if (cmsLoop != kForever) {