Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Commit d7ae051

Browse files
committed
Dfu: always delay after Detach, increase system driver loading delay
1 parent 9885999 commit d7ae051

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Dfu/Device.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,6 @@ public void Reconfigure()
241241
if (DfuDescriptor.WillDetach)
242242
{
243243
Close();
244-
// some additional sleep is introduced to amount to the OS detection and driver mounting delays
245-
Thread.Sleep(DfuDescriptor.DetachTimeout + 200);
246244
}
247245
// Otherwise, the device starts a timer counting the amount of time
248246
// specified, in milliseconds, in the wDetachTimeout field.
@@ -252,6 +250,9 @@ public void Reconfigure()
252250
{
253251
BusReset();
254252
}
253+
254+
// some additional sleep is introduced to amount to the OS detection and driver mounting delays
255+
Thread.Sleep(DfuDescriptor.DetachTimeout + 500);
255256
}
256257

257258
/// <summary>

0 commit comments

Comments
 (0)