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; } }