Compare commits

..

No commits in common. "main" and "v2.42.3-hotfix-ssh-stopprog-timing.1" have entirely different histories.

View file

@ -228,14 +228,15 @@ namespace PepperDash.Core
return; return;
} }
ConnectEnabled = true;
if (_isProgramStopping) if (_isProgramStopping)
{ {
this.LogDebug("Skipping connect because program is stopping"); this.LogDebug("Skipping connect because program is stopping");
ConnectEnabled = false;
return; return;
} }
ConnectEnabled = true;
try try
{ {
connectLock.Wait(); connectLock.Wait();
@ -516,7 +517,7 @@ namespace PepperDash.Core
this.LogError("ObjectDisposedException sending '{message}'. Restarting connection...", text.Trim()); this.LogError("ObjectDisposedException sending '{message}'. Restarting connection...", text.Trim());
KillClient(SocketStatus.SOCKET_STATUS_CONNECT_FAILED); KillClient(SocketStatus.SOCKET_STATUS_CONNECT_FAILED);
if (AutoReconnect && ConnectEnabled && !_isProgramStopping) if (ConnectEnabled && !_isProgramStopping)
{ {
StartReconnectTimer(); StartReconnectTimer();
} }
@ -552,7 +553,7 @@ namespace PepperDash.Core
this.LogException(ex, "ObjectDisposedException sending {message}", ComTextHelper.GetEscapedText(bytes)); this.LogException(ex, "ObjectDisposedException sending {message}", ComTextHelper.GetEscapedText(bytes));
KillClient(SocketStatus.SOCKET_STATUS_CONNECT_FAILED); KillClient(SocketStatus.SOCKET_STATUS_CONNECT_FAILED);
if (AutoReconnect && ConnectEnabled && !_isProgramStopping) if (ConnectEnabled && !_isProgramStopping)
{ {
StartReconnectTimer(); StartReconnectTimer();
} }