Commit 8c7fba49 by liulongfei

IP获取错误问题

parent 597c6690
......@@ -439,6 +439,11 @@ namespace VIZ.H2V.Module
{
// 添加新的UDP管理器
string clientIP = ApplicationDomainEx.IniStorage.GetValue<UdpConfig, string>(p => p.UDP_BINDING_IP);
// UDP本机绑定IP, 如果该值不配置,那么会获取本机的第一个IPV4地址
if (string.IsNullOrWhiteSpace(clientIP))
{
clientIP = NetHelper.GetLocalFirstIPv4Address();
}
string streamIP = (this.Support.ViewConfig.StreamAddress ?? string.Empty).Split(':').FirstOrDefault()?.Trim();
AlgorithmStrategy strategy = ApplicationDomainEx.CsvContext.AlgorithmStrategys.FirstOrDefault(p => p.Type == this.Support.ViewConfig.StrategyType);
......
......@@ -44,6 +44,7 @@ namespace VIZ.H2V.Module
// -----------------------------------------------------------------
// 客户端
string clientIP = ApplicationDomainEx.IniStorage.GetValue<UdpConfig, string>(p => p.UDP_BINDING_IP);
// UDP本机绑定IP, 如果该值不配置,那么会获取本机的第一个IPV4地址
if (string.IsNullOrWhiteSpace(clientIP))
{
clientIP = NetHelper.GetLocalFirstIPv4Address();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment