mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-06-27 05:23:13 +00:00
1.6.1
This commit is contained in:
@ -165,7 +165,7 @@ namespace Esiur.Net.Sockets
|
||||
{
|
||||
ssl.BeginWrite(kv.Value, 0, kv.Value.Length, SendCallback, kv.Key);
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch //(Exception ex)
|
||||
{
|
||||
asyncSending = false;
|
||||
try
|
||||
@ -179,7 +179,7 @@ namespace Esiur.Net.Sockets
|
||||
Close();
|
||||
}
|
||||
}
|
||||
catch (Exception ex2)
|
||||
catch //(Exception ex2)
|
||||
{
|
||||
//state = SocketState.Closed;// .Terminated;
|
||||
Close();
|
||||
@ -439,7 +439,7 @@ namespace Esiur.Net.Sockets
|
||||
ssl.BeginRead(receiveBuffer, 0, receiveBuffer.Length, ReceiveCallback, this);
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch //(Exception ex)
|
||||
{
|
||||
if (state != SocketState.Closed && !sock.Connected)
|
||||
{
|
||||
|
@ -126,7 +126,7 @@ namespace Esiur.Net.Sockets
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch //(Exception ex)
|
||||
{
|
||||
if (socket.state != SocketState.Closed && !socket.sock.Connected)
|
||||
{
|
||||
@ -500,7 +500,7 @@ namespace Esiur.Net.Sockets
|
||||
socket.Close();
|
||||
}
|
||||
}
|
||||
catch (Exception ex2)
|
||||
catch //(Exception ex2)
|
||||
{
|
||||
socket.Close();
|
||||
//socket.state = SocketState.Closed;// .Terminated;
|
||||
|
@ -118,6 +118,7 @@ namespace Esiur.Net.Sockets
|
||||
|
||||
public void Send(byte[] message)
|
||||
{
|
||||
|
||||
lock (sendLock)
|
||||
{
|
||||
if (held)
|
||||
@ -131,9 +132,8 @@ namespace Esiur.Net.Sockets
|
||||
|
||||
pkt_send.Message = message;
|
||||
|
||||
|
||||
if (pkt_send.Compose())
|
||||
sock.Send(pkt_send.Data);
|
||||
sock?.Send(pkt_send.Data);
|
||||
|
||||
}
|
||||
}
|
||||
@ -229,8 +229,6 @@ namespace Esiur.Net.Sockets
|
||||
if (pkt_send.Compose())
|
||||
sock.Send(pkt_send.Data);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user