Fix terrminal not closing afer 3 tries
This commit is contained in:
1 parent
17f93ce629
commit
2d3fb53fbe
1 file changed
+4
@@ -151,6 +151,10 @@ export const Terminal = forwardRef<any, SSHTerminalProps>(function SSHTerminal(
|
||||
// Check if we've already reached max attempts
|
||||
if (reconnectAttempts.current >= maxReconnectAttempts) {
|
||||
toast.error(t('terminal.maxReconnectAttemptsReached'));
|
||||
// Close the terminal tab when max attempts reached
|
||||
if (onClose) {
|
||||
onClose();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user