fix: use continue instead of return when a touchpanel room bridge is missing, and register room bridges added via AddDefaultDeviceMessenger

This commit is contained in:
Erik Meyer 2026-08-25 17:30:34 -04:00
parent 695ab00c6e
commit 4926b005d6
2 changed files with 7 additions and 2 deletions

View file

@ -512,6 +512,12 @@ namespace PepperDash.Essentials
{
simplMessenger.ConfigurationIsReady += Bridge_ConfigurationIsReady;
}
if (messenger is MobileControlBridgeBase roomBridge)
{
_roomBridges.Add(roomBridge);
}
this.LogVerbose(
"Adding default messenger with key {messengerKey} for path {messengerPath}",
messenger.Key,

View file

@ -356,11 +356,10 @@ namespace PepperDash.Essentials.WebSocketServer
foreach (var client in touchpanelsToAdd)
{
var bridge = _parent.GetRoomBridge(client.DefaultRoomKey);
if (bridge == null)
{
this.LogWarning("Unable to find room with key: {defaultRoomKey}", client.DefaultRoomKey);
return;
continue;
}
var (key, path) = GenerateClientToken(bridge, client.Key);