aboutsummaryrefslogtreecommitdiff
path: root/rtc_base/test_client.cc
diff options
context:
space:
mode:
Diffstat (limited to 'rtc_base/test_client.cc')
-rw-r--r--rtc_base/test_client.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/rtc_base/test_client.cc b/rtc_base/test_client.cc
index e5aa9d7987..f23ac2aec0 100644
--- a/rtc_base/test_client.cc
+++ b/rtc_base/test_client.cc
@@ -75,7 +75,7 @@ std::unique_ptr<TestClient::Packet> TestClient::NextPacket(int timeout_ms) {
int64_t end = TimeAfter(timeout_ms);
while (TimeUntil(end) > 0) {
{
- CritScope cs(&crit_);
+ webrtc::MutexLock lock(&mutex_);
if (packets_.size() != 0) {
break;
}
@@ -85,7 +85,7 @@ std::unique_ptr<TestClient::Packet> TestClient::NextPacket(int timeout_ms) {
// Return the first packet placed in the queue.
std::unique_ptr<Packet> packet;
- CritScope cs(&crit_);
+ webrtc::MutexLock lock(&mutex_);
if (packets_.size() > 0) {
packet = std::move(packets_.front());
packets_.erase(packets_.begin());
@@ -149,7 +149,7 @@ void TestClient::OnPacket(AsyncPacketSocket* socket,
size_t size,
const SocketAddress& remote_addr,
const int64_t& packet_time_us) {
- CritScope cs(&crit_);
+ webrtc::MutexLock lock(&mutex_);
packets_.push_back(
std::make_unique<Packet>(remote_addr, buf, size, packet_time_us));
}