mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 10:58:28 +00:00
feat: update IP address retrieval logic to handle invalid values
This commit is contained in:
parent
f68e033850
commit
73bc50ef0d
1 changed files with 3 additions and 3 deletions
|
|
@ -59,10 +59,10 @@ public class RoutingFeedbackWebsocket : IKeyed
|
||||||
if (service == null) return "";
|
if (service == null) return "";
|
||||||
|
|
||||||
var ip = CrestronEthernetHelper.GetEthernetParameter(
|
var ip = CrestronEthernetHelper.GetEthernetParameter(
|
||||||
CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 1);
|
CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0);
|
||||||
if (string.IsNullOrEmpty(ip))
|
if (string.IsNullOrEmpty(ip) || ip == "Invalid Value")
|
||||||
ip = CrestronEthernetHelper.GetEthernetParameter(
|
ip = CrestronEthernetHelper.GetEthernetParameter(
|
||||||
CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0);
|
CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 1);
|
||||||
|
|
||||||
return $"wss://{ip}:{_httpsServer.Port}{service.Path}";
|
return $"wss://{ip}:{_httpsServer.Port}{service.Path}";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue