Skip to content

Commit 82dec08

Browse files
committed
Adding a 500 ms delay before disconnecting
1 parent abd9edc commit 82dec08

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/dfu/src/main/java/no/nordicsemi/android/dfu/ButtonlessDfuImpl.java

+3
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ public void performDfu(@NonNull final Intent intent)
135135
// but reset instead. In that case, Android would assume disconnection after
136136
// "supervision timeout" seconds, which may be 5 more seconds.
137137
if (shouldScanForBootloader()) {
138+
// Why waiting? See: https://github.com/NordicSemiconductor/Android-DFU-Library/issues/444
139+
mService.waitFor(500);
140+
138141
// If the device will use a different address in bootloader mode, there is no
139142
// reason to wait for that. The library will immediately start scanning for the
140143
// device advertising in bootloader mode and connect to it.

0 commit comments

Comments
 (0)