mirror of
https://github.com/FastTunnel/FastTunnel.git
synced 2025-02-08 02:39:29 +08:00
解决客户端空指针bug
This commit is contained in:
parent
bf8461a7d2
commit
54627a78cb
|
@ -151,7 +151,7 @@ namespace FastTunnel.Core.Core
|
|||
|
||||
try
|
||||
{
|
||||
if (_client.Socket.Connected)
|
||||
if (_client != null && _client.Socket.Connected)
|
||||
{
|
||||
_client.Socket.Shutdown(SocketShutdown.Both);
|
||||
}
|
||||
|
@ -162,7 +162,11 @@ namespace FastTunnel.Core.Core
|
|||
}
|
||||
finally
|
||||
{
|
||||
_client.Socket.Close();
|
||||
if (_client != null)
|
||||
{
|
||||
_client.Socket.Close();
|
||||
}
|
||||
|
||||
_logger.LogDebug("已退出登录\n");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user