Skip to content

Commit be59cc3

Browse files
committed
Stop trying to connect to a cluster when it doesn't appear to be available
Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
1 parent b361edc commit be59cc3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/openshift/cluster.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,10 +530,10 @@ export class Cluster extends OpenShiftItem {
530530
);
531531
if (promptResponse === startCrc){
532532
await commands.executeCommand('openshift.explorer.addCluster', 'crc');
533-
// no point in continuing with the wizard,
534533
// it will take the cluster a few minutes to stabilize
535-
return null;
536534
}
535+
// Anyway, no point in continuing with the wizard
536+
return null;
537537
} else if (Cluster.isSandboxCluster(clusterURL)) {
538538
const devSandboxSignup = 'Sign up for OpenShift Dev Sandbox';
539539
const promptResponse = await window.showWarningMessage(
@@ -548,9 +548,11 @@ export class Cluster extends OpenShiftItem {
548548
return null;
549549
}
550550
} else {
551+
// Stop trying because the cluster doesn't appear to be available
551552
void window.showWarningMessage(
552553
'Unable to contact the cluster. Is it running and accessible?',
553554
);
555+
return null;
554556
}
555557
}
556558
} while (!clusterIsUp);

0 commit comments

Comments
 (0)