Compare commits

..

2 commits

Author SHA1 Message Date
Neil Dorin
7f05654638
Merge pull request #1469 from PepperDash/hotfix/ssh-stopprog-timing
fix(core-ssh): stop reconnect loop during stopprog
2026-08-20 14:47:33 -06:00
Robert Sanders
4ca59e3186 fix(core-ssh): harden GenericSshClient shutdown reconnect guards 2026-08-20 16:39:20 -04:00

View file

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