SecureDFUService
1 parent deb5cfc commit 38fa34aCopy full SHA for 38fa34a
1 file changed
Sources/NordicDFU/SecureDFUService.swift
@@ -129,7 +129,7 @@ internal extension SecureDFUService {
129
while self.controlPoint.checksum(for: UInt32(writtenBytes)) == nil {
130
131
// wait for PRN
132
- sleep(1)
+ usleep(100)
133
}
134
135
packetsSincePRN = 0
@@ -255,7 +255,7 @@ internal extension SecureDFUService {
255
256
257
private func notification(_ notification: ErrorValue<SecureDFUControlPoint>) {
258
-
+
259
self.notifications.append(Notification(value: notification))
260
261
@@ -307,7 +307,7 @@ internal extension SecureDFUService {
307
308
// get notification response
309
guard let notification = newNotifications.first
310
- else { sleep(1); continue }
+ else { usleep(100); continue }
311
312
return try notification.response()
313
0 commit comments