mirror of
https://gitee.com/iioter/iotgateway.git
synced 2024-11-29 18:28:09 +08:00
Demo Tcp驱动连接状态判断
This commit is contained in:
parent
231534125a
commit
6c86b63d06
@ -58,7 +58,7 @@ namespace Mock.TcpClient
|
||||
get
|
||||
{
|
||||
//客户端对象不为空并且客户端已连接则返回true
|
||||
return _client != null && _client.TcpClient.Connected;
|
||||
return _client != null && _client.TcpClient != null && _client.TcpClient.Connected;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user