From a32120b0baed01d5d0028c696cecba9acb12fdbe Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 30 一月 2024 17:07:32 +0800
Subject: [PATCH] 优化储能标题,优化分享权限页面背景色,修复可视对讲无法通知问题

---
 HDL_ON/DAL/DriverLayer/UdpSocket.cs |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/HDL_ON/DAL/DriverLayer/UdpSocket.cs b/HDL_ON/DAL/DriverLayer/UdpSocket.cs
index c4b37fd..f6f9c40 100644
--- a/HDL_ON/DAL/DriverLayer/UdpSocket.cs
+++ b/HDL_ON/DAL/DriverLayer/UdpSocket.cs
@@ -43,8 +43,14 @@
             if (Port == 0)
                 return;
 
-            busSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-            busSocket.EnableBroadcast = true;
+            try
+            {
+                busSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
+                busSocket.EnableBroadcast = true;
+            }catch(Exception ex)
+            {
+                MainPage.Log("Socket 寮傚父 : " + ex.Message);
+            }
             try
             {
                 busSocket.Bind(new IPEndPoint(IPAddress.Any, Port));

--
Gitblit v1.8.0