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