Merge branch 'main' into hotfix/ssh-logging-reduction

This commit is contained in:
Neil Dorin
2022-11-14 09:46:01 -07:00
committed by GitHub
3 changed files with 50 additions and 11 deletions

View File

@@ -298,6 +298,7 @@ namespace PepperDash.Core
/// </summary>
public void Disconnect()
{
Debug.Console(2, "Disconnect Called");
ConnectEnabled = false;
// Stop trying reconnects, if we are
if (ReconnectTimer != null)
@@ -315,11 +316,13 @@ namespace PepperDash.Core
private void KillClient(SocketStatus status)
{
KillStream();
IsConnecting = false;
if (Client != null)
{
IsConnecting = false;
Client.ErrorOccurred -= Client_ErrorOccurred;
Client.Disconnect();
Client.Dispose();
Client = null;
ClientStatus = status;
Debug.Console(1, this, "Disconnected");