mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-04-30 10:47:48 +02:00
Client: Update IsConnected on EndReceive socket exception
This commit is contained in:
parent
5c4e369896
commit
b0912850dd
2 changed files with 6 additions and 0 deletions
|
@ -436,17 +436,20 @@ namespace SMBLibrary.Client
|
|||
}
|
||||
catch (ArgumentException) // The IAsyncResult object was not returned from the corresponding synchronous method on this class.
|
||||
{
|
||||
m_isConnected = false;
|
||||
state.ReceiveBuffer.Dispose();
|
||||
return;
|
||||
}
|
||||
catch (ObjectDisposedException)
|
||||
{
|
||||
m_isConnected = false;
|
||||
Log("[ReceiveCallback] EndReceive ObjectDisposedException");
|
||||
state.ReceiveBuffer.Dispose();
|
||||
return;
|
||||
}
|
||||
catch (SocketException ex)
|
||||
{
|
||||
m_isConnected = false;
|
||||
Log("[ReceiveCallback] EndReceive SocketException: " + ex.Message);
|
||||
state.ReceiveBuffer.Dispose();
|
||||
return;
|
||||
|
|
|
@ -369,17 +369,20 @@ namespace SMBLibrary.Client
|
|||
}
|
||||
catch (ArgumentException) // The IAsyncResult object was not returned from the corresponding synchronous method on this class.
|
||||
{
|
||||
m_isConnected = false;
|
||||
state.ReceiveBuffer.Dispose();
|
||||
return;
|
||||
}
|
||||
catch (ObjectDisposedException)
|
||||
{
|
||||
m_isConnected = false;
|
||||
Log("[ReceiveCallback] EndReceive ObjectDisposedException");
|
||||
state.ReceiveBuffer.Dispose();
|
||||
return;
|
||||
}
|
||||
catch (SocketException ex)
|
||||
{
|
||||
m_isConnected = false;
|
||||
Log("[ReceiveCallback] EndReceive SocketException: " + ex.Message);
|
||||
state.ReceiveBuffer.Dispose();
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue