diff --git a/Sources/App/DeviceManager.swift b/Sources/App/DeviceManager.swift index 98723a9..ea8095b 100644 --- a/Sources/App/DeviceManager.swift +++ b/Sources/App/DeviceManager.swift @@ -79,7 +79,6 @@ final class DeviceManager { } do { try await socket.send(Array(message)) - await updateMessageCountMetric() } catch { throw MessageResult.deviceNotConnected } @@ -88,6 +87,7 @@ final class DeviceManager { let result: Data = try await withCheckedThrowingContinuation { continuation in self.requestInProgress = continuation } + await updateMessageCountMetric() return result } @@ -163,6 +163,7 @@ final class DeviceManager { self?.didCloseDeviceSocket() } } + log("[INFO] Socket connected") await updateDeviceConnectionMetric() } }