Fix terrminal not closing afer 3 tries

This commit is contained in:
LukeGus
2025-09-11 01:33:39 -05:00
parent 17f93ce629
commit 2d3fb53fbe

View File

@@ -151,6 +151,10 @@ export const Terminal = forwardRef<any, SSHTerminalProps>(function SSHTerminal(
// Check if we've already reached max attempts // Check if we've already reached max attempts
if (reconnectAttempts.current >= maxReconnectAttempts) { if (reconnectAttempts.current >= maxReconnectAttempts) {
toast.error(t('terminal.maxReconnectAttemptsReached')); toast.error(t('terminal.maxReconnectAttemptsReached'));
// Close the terminal tab when max attempts reached
if (onClose) {
onClose();
}
return; return;
} }