File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -35,14 +35,15 @@ export class ConnectClusterTool extends AtlasToolBase {
35
35
}
36
36
37
37
const currentConectionState = this . session . connectionManager . currentConnectionState ;
38
-
39
38
switch ( currentConectionState . tag ) {
40
39
case "connected" :
41
40
if (
42
41
this . session . connectedAtlasCluster . projectId !== projectId ||
43
42
this . session . connectedAtlasCluster . clusterName !== clusterName
44
43
) {
45
44
return "connected-to-other-cluster" ;
45
+ } else {
46
+ return "connected" ;
46
47
}
47
48
break ;
48
49
case "connecting" :
@@ -220,6 +221,7 @@ export class ConnectClusterTool extends AtlasToolBase {
220
221
}
221
222
case "connected-to-other-cluster" :
222
223
await this . session . disconnect ( ) ;
224
+ // eslint-disable-next-line no-fallthrough
223
225
case "disconnected" :
224
226
default : {
225
227
const { connectionString, atlas } = await this . prepareClusterConnection ( projectId , clusterName ) ;
You can’t perform that action at this time.
0 commit comments