Skip to content

Commit 693c755

Browse files
committed
chore: finish the refactor and clean up
1 parent 17494ac commit 693c755

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tools/atlas/connect/connectCluster.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,15 @@ export class ConnectClusterTool extends AtlasToolBase {
3535
}
3636

3737
const currentConectionState = this.session.connectionManager.currentConnectionState;
38-
3938
switch (currentConectionState.tag) {
4039
case "connected":
4140
if (
4241
this.session.connectedAtlasCluster.projectId !== projectId ||
4342
this.session.connectedAtlasCluster.clusterName !== clusterName
4443
) {
4544
return "connected-to-other-cluster";
45+
} else {
46+
return "connected";
4647
}
4748
break;
4849
case "connecting":
@@ -220,6 +221,7 @@ export class ConnectClusterTool extends AtlasToolBase {
220221
}
221222
case "connected-to-other-cluster":
222223
await this.session.disconnect();
224+
// eslint-disable-next-line no-fallthrough
223225
case "disconnected":
224226
default: {
225227
const { connectionString, atlas } = await this.prepareClusterConnection(projectId, clusterName);

0 commit comments

Comments
 (0)