SMB1Client, SMB2Client: Disconnect: Invoke Socket.Close

This commit is contained in:
Tal Aloni 2024-02-11 00:29:06 +02:00
parent b03050028a
commit 18275637d7
2 changed files with 2 additions and 0 deletions

View file

@ -171,6 +171,7 @@ namespace SMBLibrary.Client
if (m_isConnected)
{
m_clientSocket.Disconnect(false);
m_clientSocket.Close();
m_connectionState.ReceiveBuffer.Dispose();
m_isConnected = false;
m_userID = 0;

View file

@ -181,6 +181,7 @@ namespace SMBLibrary.Client
if (m_isConnected)
{
m_clientSocket.Disconnect(false);
m_clientSocket.Close();
m_connectionState.ReceiveBuffer.Dispose();
m_isConnected = false;
m_messageID = 0;