From 2d5cd35af7437ad4015d38594d8c721dc6166b11 Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期二, 29 八月 2023 09:22:38 +0800 Subject: [PATCH] Merge branch 'wjc' of http://59.41.255.150:6688/r/~wxr/OnPro into wjc --- HDL_ON/DAL/DriverLayer/Control_TcpClient.cs | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/HDL_ON/DAL/DriverLayer/Control_TcpClient.cs b/HDL_ON/DAL/DriverLayer/Control_TcpClient.cs index 2c53a79..84e305b 100644 --- a/HDL_ON/DAL/DriverLayer/Control_TcpClient.cs +++ b/HDL_ON/DAL/DriverLayer/Control_TcpClient.cs @@ -130,6 +130,7 @@ /// </summary> public void Connect() { + return; lock (lockObj) { if (isConnected) @@ -224,6 +225,10 @@ /// <param name="bytes">闇�瑕佸彂閫佺殑瀛楄妭</param> public void SendMessage(byte[] bytes) { + return; +#if __IOS__ + +#endif if (heartBeatLogIdList.Count > 3) { try @@ -240,6 +245,14 @@ } try { + if (_tcpClient == null) + { + return; + } + if (!_tcpClient.Connected) + { + return; + } if (_tcpClient.GetStream().CanWrite&& isConnected) { _tcpClient.GetStream().Write(bytes, 0, bytes.Length); @@ -258,6 +271,7 @@ private DateTime heartBeatTime; public void HeartBeat() { + return; lock (lockObj) { if (heartBeatThread == null) -- Gitblit v1.8.0