Demo Tcp驱动连接状态判断
This commit is contained in:
parent
231534125a
commit
6c86b63d06
@ -58,7 +58,7 @@ namespace Mock.TcpClient
|
|||||||
get
|
get
|
||||||
{
|
{
|
||||||
//客户端对象不为空并且客户端已连接则返回true
|
//客户端对象不为空并且客户端已连接则返回true
|
||||||
return _client != null && _client.TcpClient.Connected;
|
return _client != null && _client.TcpClient != null && _client.TcpClient.Connected;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user