From d76b0e40e5bb127fd33aa1f7842447a1df0628d5 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期日, 30 七月 2023 22:16:34 +0800 Subject: [PATCH] Update PublicAssmeblyBLL.cs --- HDL_ON/DAL/DriverLayer/Control_TcpClient.cs | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) diff --git a/HDL_ON/DAL/DriverLayer/Control_TcpClient.cs b/HDL_ON/DAL/DriverLayer/Control_TcpClient.cs index 53d4457..bf82c8e 100644 --- a/HDL_ON/DAL/DriverLayer/Control_TcpClient.cs +++ b/HDL_ON/DAL/DriverLayer/Control_TcpClient.cs @@ -224,14 +224,10 @@ /// <param name="bytes">闇�瑕佸彂閫佺殑瀛楄妭</param> public void SendMessage(byte[] bytes) { - if(_tcpClient == null) - { - return; - } - if (!_tcpClient.Connected) - { - return; - } + return; +#if __IOS__ + +#endif if (heartBeatLogIdList.Count > 3) { try @@ -248,6 +244,14 @@ } try { + if (_tcpClient == null) + { + return; + } + if (!_tcpClient.Connected) + { + return; + } if (_tcpClient.GetStream().CanWrite&& isConnected) { _tcpClient.GetStream().Write(bytes, 0, bytes.Length); @@ -266,6 +270,7 @@ private DateTime heartBeatTime; public void HeartBeat() { + return; lock (lockObj) { if (heartBeatThread == null) -- Gitblit v1.8.0