Skip to content

Commit e211975

Browse files
committed
Fix race in NetworkLoop
1 parent d0f9d22 commit e211975

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/internal_modules/roc_netio/target_libuv/roc_netio/network_loop.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,11 @@ NetworkLoop::NetworkLoop(core::IPool& packet_pool,
148148
return;
149149
}
150150

151-
while (init_status_ == status::NoStatus) {
151+
{
152152
core::Mutex::Lock lock(thr_init_mutex_);
153-
thr_init_cond_.wait();
153+
while (init_status_ == status::NoStatus) {
154+
thr_init_cond_.wait();
155+
}
154156
}
155157
}
156158

0 commit comments

Comments
 (0)