added check when adding sink device for if the device is actually a sink

This commit is contained in:
Nick Genovese
2020-05-28 14:02:43 -04:00
parent b39afe2f50
commit 305fe5c372

View File

@@ -152,7 +152,8 @@ namespace PepperDash.Essentials.Core
if (outputPortToUse == null) if (outputPortToUse == null)
{ {
// it's a sink device // it's a sink device
routeTable.Routes.Add(new RouteSwitchDescriptor(goodInputPort)); if (destination is IRoutingSinkWithSwitching)
routeTable.Routes.Add(new RouteSwitchDescriptor(goodInputPort));
} }
else if (destination is IRouting) else if (destination is IRouting)
{ {