Fix network netries to work even on failures
This commit is contained in:
parent
9dec9c9df7
commit
e541b5efa1
1 changed files with 3 additions and 4 deletions
|
@ -190,14 +190,13 @@ class PiHoleDataStore: ObservableObject {
|
|||
.sink(receiveCompletion: { (completion) in
|
||||
switch completion {
|
||||
case .finished:
|
||||
if let completionBlock = completionBlock {
|
||||
completionBlock()
|
||||
}
|
||||
self.currentRequest = nil
|
||||
return
|
||||
case .failure(let error):
|
||||
self.pihole = .failure(.networkError(self.oldPiHole, error: error))
|
||||
}
|
||||
if let completionBlock = completionBlock {
|
||||
completionBlock()
|
||||
}
|
||||
}, receiveValue: { pihole in
|
||||
UIApplication.shared.shortcutItems = [
|
||||
UIApplicationShortcutItem(
|
||||
|
|
Loading…
Reference in a new issue