Bug 1373103: log TCP read callback log message only if more then 5 callback are pending. r?mjf
MozReview-Commit-ID: E0oAG89XGwg
--- a/media/mtransport/nr_socket_prsock.cpp
+++ b/media/mtransport/nr_socket_prsock.cpp
@@ -2089,18 +2089,20 @@ void NrTcpSocketIpc::maybe_post_socket_r
r_log(LOG_GENERIC, LOG_INFO, "Firing write callback (%u)",
(uint32_t)buffered_bytes_);
fire_callback(NR_ASYNC_WAIT_WRITE);
has_event = true;
}
}
if (poll_flags() & PR_POLL_READ) {
if (msg_queue_.size()) {
- r_log(LOG_GENERIC, LOG_INFO, "Firing read callback (%u)",
- (uint32_t)msg_queue_.size());
+ if (msg_queue_.size() > 5) {
+ r_log(LOG_GENERIC, LOG_INFO, "Firing read callback (%u)",
+ (uint32_t)msg_queue_.size());
+ }
fire_callback(NR_ASYNC_WAIT_READ);
has_event = true;
}
}
}
// If any event has been posted, we post a runnable to see
// if the events have to be posted again.