mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-04-12 12:06:29 +00:00
Merge pull request #141 from PepperDash/feature/ssh-dispose
Feature/ssh dispose
This commit is contained in:
commit
89c503c636
1 changed files with 5 additions and 2 deletions
|
|
@ -293,6 +293,7 @@ namespace PepperDash.Core
|
|||
/// </summary>
|
||||
public void Disconnect()
|
||||
{
|
||||
Debug.Console(2, "Disconnect Called");
|
||||
ConnectEnabled = false;
|
||||
// Stop trying reconnects, if we are
|
||||
if (ReconnectTimer != null)
|
||||
|
|
@ -310,11 +311,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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue