From 6c86b63d06da18c2cbdfff0eedda232245aaa2f0 Mon Sep 17 00:00:00 2001 From: iioter <535915157@qq.com> Date: Mon, 8 Jan 2024 22:23:19 +0800 Subject: [PATCH] =?UTF-8?q?Demo=20Tcp=E9=A9=B1=E5=8A=A8=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Plugins/Drivers/Mock.TcpClient/DeviceTcpClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Drivers/Mock.TcpClient/DeviceTcpClient.cs b/Plugins/Drivers/Mock.TcpClient/DeviceTcpClient.cs index 5132f09..b0e0dbf 100644 --- a/Plugins/Drivers/Mock.TcpClient/DeviceTcpClient.cs +++ b/Plugins/Drivers/Mock.TcpClient/DeviceTcpClient.cs @@ -58,7 +58,7 @@ namespace Mock.TcpClient get { //客户端对象不为空并且客户端已连接则返回true - return _client != null && _client.TcpClient.Connected; + return _client != null && _client.TcpClient != null && _client.TcpClient.Connected; } }