Fix terrminal not closing afer 3 tries
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user