diff --git a/Pepperdash Core/Pepperdash Core/Comm/GenericSshClient.cs b/Pepperdash Core/Pepperdash Core/Comm/GenericSshClient.cs index 16ccff2..797bfdd 100644 --- a/Pepperdash Core/Pepperdash Core/Comm/GenericSshClient.cs +++ b/Pepperdash Core/Pepperdash Core/Comm/GenericSshClient.cs @@ -303,11 +303,16 @@ namespace PepperDash.Core ReconnectTimer.Stop(); ReconnectTimer = null; } + KillStream(); - Client.Disconnect(); - Client = null; - ClientStatus = SocketStatus.SOCKET_STATUS_BROKEN_LOCALLY; - Debug.Console(1, this, "Disconnected"); + + if (Client != null) + { + Client.Disconnect(); + Client = null; + ClientStatus = SocketStatus.SOCKET_STATUS_BROKEN_LOCALLY; + Debug.Console(1, this, "Disconnected"); + } } /// diff --git a/Pepperdash Core/Pepperdash Core/Comm/GenericTcpIpClient.cs b/Pepperdash Core/Pepperdash Core/Comm/GenericTcpIpClient.cs index aa6304d..e24278a 100644 --- a/Pepperdash Core/Pepperdash Core/Comm/GenericTcpIpClient.cs +++ b/Pepperdash Core/Pepperdash Core/Comm/GenericTcpIpClient.cs @@ -287,7 +287,8 @@ namespace PepperDash.Core // Check debug level before processing byte array //if (Debug.Level == 2) // Debug.Console(2, this, "Sending {0} bytes: '{1}'", bytes.Length, ComTextHelper.GetEscapedText(bytes)); - Client.SendData(bytes, bytes.Length); + if(Client != null) + Client.SendData(bytes, bytes.Length); } /// diff --git a/Pepperdash Core/Pepperdash Core/Properties/AssemblyInfo.cs b/Pepperdash Core/Pepperdash Core/Properties/AssemblyInfo.cs index b23d9ad..bb7ad45 100644 --- a/Pepperdash Core/Pepperdash Core/Properties/AssemblyInfo.cs +++ b/Pepperdash Core/Pepperdash Core/Properties/AssemblyInfo.cs @@ -4,4 +4,4 @@ [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Pepperdash_Core")] [assembly: AssemblyCopyright("Copyright © PepperDash 2016")] -[assembly: AssemblyVersion("1.0.1.*")] +[assembly: AssemblyVersion("1.0.2.*")]