Skip to content

Commit 528ae4c

Browse files
ftsuicopybara-github
authored andcommitted
Fix infinite loop if GATT server fails to start initially.
PiperOrigin-RevId: 736972233
1 parent f7e97d2 commit 528ae4c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/platform/implementation/windows/ble_gatt_server.cc

+3
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,9 @@ bool BleGattServer::StartAdvertisement(const ByteArray& service_data,
451451
if (absl::Milliseconds(wait_milliseconds) > kGattServerTimeout) {
452452
LOG(ERROR) << __func__
453453
<< ": Failed to start GATT advertising due to timeout.";
454+
// GattServiceProvider can become Started after the timeout. Stop
455+
// waiting for the status change and continue as if it has started..
456+
break;
454457
}
455458
}
456459

0 commit comments

Comments
 (0)