mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-04-12 12:06:29 +00:00
#28 Fixes issue where GenericTxpIpClient would attempt to reconnect when it was disconnected on a shutdown or program stop.
This commit is contained in:
parent
e4712ebc53
commit
f89c75debc
1 changed files with 5 additions and 5 deletions
|
|
@ -224,7 +224,7 @@ namespace PepperDash.Core
|
||||||
if (programEventType == eProgramStatusEventType.Stopping)
|
if (programEventType == eProgramStatusEventType.Stopping)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Program stopping. Closing connection");
|
Debug.Console(1, this, "Program stopping. Closing connection");
|
||||||
DisconnectClient();
|
Disconnect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -363,8 +363,8 @@ namespace PepperDash.Core
|
||||||
{
|
{
|
||||||
var bytes = Encoding.GetEncoding(28591).GetBytes(text);
|
var bytes = Encoding.GetEncoding(28591).GetBytes(text);
|
||||||
// Check debug level before processing byte array
|
// Check debug level before processing byte array
|
||||||
//if (Debug.Level == 2)
|
|
||||||
// Debug.Console(2, this, "Sending {0} bytes: '{1}'", bytes.Length, ComTextHelper.GetEscapedText(bytes));
|
Debug.Console(2, this, "Sending {0} bytes: '{1}'", bytes.Length, ComTextHelper.GetEscapedText(bytes));
|
||||||
if(Client != null)
|
if(Client != null)
|
||||||
Client.SendData(bytes, bytes.Length);
|
Client.SendData(bytes, bytes.Length);
|
||||||
}
|
}
|
||||||
|
|
@ -388,8 +388,8 @@ namespace PepperDash.Core
|
||||||
/// <param name="bytes"></param>
|
/// <param name="bytes"></param>
|
||||||
public void SendBytes(byte[] bytes)
|
public void SendBytes(byte[] bytes)
|
||||||
{
|
{
|
||||||
//if (Debug.Level == 2)
|
|
||||||
// Debug.Console(2, this, "Sending {0} bytes: '{1}'", bytes.Length, ComTextHelper.GetEscapedText(bytes));
|
Debug.Console(2, this, "Sending {0} bytes: '{1}'", bytes.Length, ComTextHelper.GetEscapedText(bytes));
|
||||||
if(Client != null)
|
if(Client != null)
|
||||||
Client.SendData(bytes, bytes.Length);
|
Client.SendData(bytes, bytes.Length);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue