mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 22:56:12 -04:00
Fix infinite loop if GATT server fails to start initially.
PiperOrigin-RevId: 736972233
This commit is contained in:
committed by
Copybara-Service
parent
f7e97d23fe
commit
528ae4c4e2
@@ -451,6 +451,9 @@ bool BleGattServer::StartAdvertisement(const ByteArray& service_data,
|
||||
if (absl::Milliseconds(wait_milliseconds) > kGattServerTimeout) {
|
||||
LOG(ERROR) << __func__
|
||||
<< ": Failed to start GATT advertising due to timeout.";
|
||||
// GattServiceProvider can become Started after the timeout. Stop
|
||||
// waiting for the status change and continue as if it has started..
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user