2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-06-27 05:23:13 +00:00

GC bug fix

This commit is contained in:
2019-11-20 13:19:31 +03:00
parent 76bcd821b5
commit 7de6354857
22 changed files with 442 additions and 236 deletions

View File

@ -259,25 +259,33 @@ namespace Esiur.Net
public virtual void Send(byte[] msg)
{
//Console.WriteLine("TXX " + msg.Length);
try
{
//if (!connected)
//{
//Console.WriteLine("not connected");
// return;
//}
if (sock != null)
{
lastAction = DateTime.Now;
sock.Send(msg);
}
}
catch (Exception ex)
catch
{
Console.WriteLine(ex.ToString());
}
}
public virtual void Send(byte[] msg, int offset, int length)
{
try
{
if (sock != null)
{
lastAction = DateTime.Now;
sock.Send(msg, offset, length);
}
}
catch
{
}
}