From 0bd5b2652bd977e823e877025038bb46bd36b48e Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 28 七月 2023 10:33:31 +0800 Subject: [PATCH] Merge branch 'Dev-Branch' into wxr-2.1 --- HDL_ON/DAL/DriverLayer/Control_TcpClient.cs | 19 +++++++++++-------- 1 files changed, 11 insertions(+), 8 deletions(-) diff --git a/HDL_ON/DAL/DriverLayer/Control_TcpClient.cs b/HDL_ON/DAL/DriverLayer/Control_TcpClient.cs index 53d4457..f9bcf3a 100644 --- a/HDL_ON/DAL/DriverLayer/Control_TcpClient.cs +++ b/HDL_ON/DAL/DriverLayer/Control_TcpClient.cs @@ -224,14 +224,9 @@ /// <param name="bytes">闇�瑕佸彂閫佺殑瀛楄妭</param> public void SendMessage(byte[] bytes) { - if(_tcpClient == null) - { - return; - } - if (!_tcpClient.Connected) - { - return; - } +#if __IOS__ + +#endif if (heartBeatLogIdList.Count > 3) { try @@ -248,6 +243,14 @@ } try { + if (_tcpClient == null) + { + return; + } + if (!_tcpClient.Connected) + { + return; + } if (_tcpClient.GetStream().CanWrite&& isConnected) { _tcpClient.GetStream().Write(bytes, 0, bytes.Length); -- Gitblit v1.8.0