mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-15 15:16:12 -04:00
Merge branch 'google3' up to cl/358291589.
This commit is contained in:
@@ -106,9 +106,8 @@ BluetoothDevice* BluetoothSocket::GetRemoteDevice() {
|
||||
|
||||
std::unique_ptr<api::BluetoothSocket> BluetoothServerSocket::Accept() {
|
||||
absl::MutexLock lock(&mutex_);
|
||||
while (pending_sockets_.empty()) {
|
||||
while (!closed_ && pending_sockets_.empty()) {
|
||||
cond_.Wait(&mutex_);
|
||||
if (closed_) break;
|
||||
}
|
||||
// whether or not we were running in the wait loop, return early if closed.
|
||||
if (closed_) return {};
|
||||
|
||||
Reference in New Issue
Block a user