From f718d23a262a5a8e1241fdeaeb4153399f95e79d Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 21 四月 2020 09:19:05 +0800
Subject: [PATCH] 20200421
---
HDL_ON/DriverLayer/BusSocket.cs | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/HDL_ON/DriverLayer/BusSocket.cs b/HDL_ON/DriverLayer/BusSocket.cs
index 84f1942..e8b346c 100644
--- a/HDL_ON/DriverLayer/BusSocket.cs
+++ b/HDL_ON/DriverLayer/BusSocket.cs
@@ -1,7 +1,7 @@
锘縰sing System;
using System.Net.Sockets;
using System.Net;
-using HDL_ON.UI;
+//using HDL_ON.UI;
namespace HDL_ON
{
@@ -63,8 +63,6 @@
}
catch { }
busSocket = null;
- //HDL_ON.SimpleControl.Phone.Music.A31PlayMusicPage.isExit = true;
- //SmartHome.MqttCommon.DisConnect ();
MainPage.Log("BusSocket鍏抽棴鎴愬姛!");
}
@@ -138,16 +136,19 @@
{
try
{
- if (!IsRunning) {
- return;
- }
+ if (!IsRunning)
+ {
+ tempPacket.HaveSendCount++;
+ return;
+ }
tempPacket.FlagDateTime = System.DateTime.Now;
tempPacket.HaveSendCount++;
busSocket.BeginSendTo(tempPacket.Bytes, 0, tempPacket.Bytes.Length, SocketFlags.None, tempPacket.RemoteEndPoint, new AsyncCallback(asyncEndSend), tempPacket);
}
- catch {
-
- }
+ catch (Exception ex)
+ {
+ MainPage.Log($"AsyncBeginSend error {ex.Message}");
+ }
}
/// <summary>
--
Gitblit v1.8.0