mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 05:40:42 +01:00
Log more info when select fails
This commit is contained in:
parent
8ee5fc9619
commit
84db3b7d55
2 changed files with 10 additions and 2 deletions
|
@ -1448,6 +1448,8 @@ bool PhysicalSocketServer::WaitSelect(int cmsWait, bool process_io) {
|
||||||
if (n < 0) {
|
if (n < 0) {
|
||||||
if (errno != EINTR) {
|
if (errno != EINTR) {
|
||||||
RTC_LOG_E(LS_ERROR, EN, errno) << "select";
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
// Else ignore the error and keep going. If this EINTR was for one of the
|
// Else ignore the error and keep going. If this EINTR was for one of the
|
||||||
|
|
|
@ -846,8 +846,14 @@ bool Thread::ProcessMessages(int cmsLoop) {
|
||||||
ScopedAutoReleasePool pool;
|
ScopedAutoReleasePool pool;
|
||||||
#endif
|
#endif
|
||||||
absl::AnyInvocable<void()&&> task = Get(cmsNext);
|
absl::AnyInvocable<void()&&> task = Get(cmsNext);
|
||||||
if (!task)
|
// RingRTC change to log more information around select failures.
|
||||||
return !IsQuitting();
|
if (!task) {
|
||||||
|
bool isQuitting = IsQuitting();
|
||||||
|
if (!isQuitting) {
|
||||||
|
RTC_LOG(LS_ERROR) << name_ << " will stop processing messages. cmsNext=" << cmsNext;
|
||||||
|
}
|
||||||
|
return !isQuitting;
|
||||||
|
}
|
||||||
Dispatch(std::move(task));
|
Dispatch(std::move(task));
|
||||||
|
|
||||||
if (cmsLoop != kForever) {
|
if (cmsLoop != kForever) {
|
||||||
|
|
Loading…
Reference in a new issue