mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-01-11 19:44:44 +00:00
fix: adds ssh dispose for the client
This commit is contained in:
@@ -290,6 +290,7 @@ namespace PepperDash.Core
|
||||
/// </summary>
|
||||
public void Disconnect()
|
||||
{
|
||||
Debug.Console(2, "Disconnect Called");
|
||||
ConnectEnabled = false;
|
||||
// Stop trying reconnects, if we are
|
||||
if (ReconnectTimer != null)
|
||||
@@ -307,11 +308,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");
|
||||
|
||||
Reference in New Issue
Block a user