add workaround for bluez notification issue

https://crbug.com/1170085
This commit is contained in:
David Lechner
2021-01-23 13:36:33 -06:00
parent 783f7e2337
commit 819810e52a
+8
View File
@@ -132,6 +132,14 @@ function* connect(_action: BootloaderConnectionAction): Generator {
});
try {
try {
yield call([characteristic, 'stopNotifications']);
} catch {
// HACK: Chromium on Linux (BlueZ) will not receive notifications
// if a device disconnects while notifications are enabled and then
// reconnects. So we have to call stopNotifications() first to get
// back to a known state. https://crbug.com/1170085
}
yield call([characteristic, 'startNotifications']);
} catch (err) {
notificationChannel.close();