From 381e76fb48384b68be48f9be4ead364135691b94 Mon Sep 17 00:00:00 2001 From: hexawyz <8518235+hexawyz@users.noreply.github.com> Date: Sun, 18 Aug 2024 22:02:25 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Properly=20register=20new=20devi?= =?UTF-8?q?ce=20states=20to=20the=20dictionary=20in=20PowerService.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Exo.Service.Core/PowerService.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Exo.Service.Core/PowerService.cs b/Exo.Service.Core/PowerService.cs index c81c854..0ae29da 100644 --- a/Exo.Service.Core/PowerService.cs +++ b/Exo.Service.Core/PowerService.cs @@ -377,6 +377,7 @@ private async ValueTask HandleArrivalAsync(DeviceWatchNotification notification, if (!_deviceStates.TryGetValue(notification.DeviceInformation.Id, out var deviceState)) { deviceState = new(this, _devicesConfigurationContainer.GetContainer(notification.DeviceInformation.Id), notification.DeviceInformation.Id, default); + _deviceStates.TryAdd(notification.DeviceInformation.Id, deviceState); shouldPersistInformation = true; }