File tree Expand file tree Collapse file tree 2 files changed +14
-14
lines changed
ORLib/ConsoleProviders/ESPProvision Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -122,16 +122,14 @@ class DeviceConnection {
122
122
bleStatus == . connected && device != nil && configChannel != nil
123
123
}
124
124
125
- func exitProvisioning( ) throws {
125
+ func exitProvisioning( ) async throws {
126
126
if !isConnected {
127
127
throw ESPProviderError ( errorCode: . notConnected, errorMessage: " No connection established to device " )
128
128
}
129
- Task {
130
- do {
131
- try await configChannel!. exitProvisioning ( )
132
- } catch {
133
- throw ESPProviderError ( errorCode: . communicationError, errorMessage: error. localizedDescription)
134
- }
129
+ do {
130
+ try await configChannel!. exitProvisioning ( )
131
+ } catch {
132
+ throw ESPProviderError ( errorCode: . communicationError, errorMessage: error. localizedDescription)
135
133
}
136
134
}
137
135
Original file line number Diff line number Diff line change @@ -152,13 +152,15 @@ class ESPProvisionProvider: NSObject {
152
152
sendExitProvisioningError ( . notConnected, errorMessage: " No connection established to device " )
153
153
return
154
154
}
155
- do {
156
- try deviceConnection!. exitProvisioning ( )
157
- callbackChannel? . sendMessage ( action: Actions . exitProvisioning, data: [ " exit " : true ] )
158
- } catch let error as ESPProviderError {
159
- sendExitProvisioningError ( error. errorCode, errorMessage: error. errorMessage)
160
- } catch {
161
- sendExitProvisioningError ( . genericError, errorMessage: error. localizedDescription)
155
+ Task {
156
+ do {
157
+ try await deviceConnection!. exitProvisioning ( )
158
+ callbackChannel? . sendMessage ( action: Actions . exitProvisioning, data: [ " exit " : true ] )
159
+ } catch let error as ESPProviderError {
160
+ sendExitProvisioningError ( error. errorCode, errorMessage: error. errorMessage)
161
+ } catch {
162
+ sendExitProvisioningError ( . genericError, errorMessage: error. localizedDescription)
163
+ }
162
164
}
163
165
}
164
166
You can’t perform that action at this time.
0 commit comments