Update device state with unlock error
This commit is contained in:
parent
e0e2a1cb06
commit
db5311074a
@ -75,7 +75,8 @@ final class DeviceManager {
|
||||
throw MessageResult.invalidServerAuthenticationFromRemote
|
||||
}
|
||||
guard let socket = connection, !socket.isClosed else {
|
||||
connection = nil
|
||||
// Ensure that metric is updated
|
||||
didCloseDeviceSocket()
|
||||
throw MessageResult.deviceNotConnected
|
||||
}
|
||||
guard receivedMessageData == nil else {
|
||||
@ -169,6 +170,9 @@ final class DeviceManager {
|
||||
|
||||
func didCloseDeviceSocket() {
|
||||
connection = nil
|
||||
Task {
|
||||
await updateDeviceConnectionMetrics()
|
||||
}
|
||||
}
|
||||
|
||||
func removeDeviceConnection() async {
|
||||
|
Loading…
Reference in New Issue
Block a user