File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -143,12 +143,11 @@ export class ConnectionManager extends EventEmitter<ConnectionManagerEvents> {
143
143
} finally {
144
144
this . changeState ( "connection-closed" , {
145
145
tag : "disconnected" ,
146
- connectedAtlasCluster : this . state . connectedAtlasCluster ,
147
146
} ) ;
148
147
}
149
148
}
150
149
151
- return { tag : "disconnected" , connectedAtlasCluster : this . state . connectedAtlasCluster } ;
150
+ return { tag : "disconnected" } ;
152
151
}
153
152
154
153
get currentConnectionState ( ) : AnyConnectionState {
Original file line number Diff line number Diff line change @@ -135,14 +135,6 @@ export class ConnectClusterTool extends AtlasToolBase {
135
135
136
136
// try to connect for about 5 minutes
137
137
for ( let i = 0 ; i < 600 ; i ++ ) {
138
- if (
139
- ! this . session . connectedAtlasCluster ||
140
- this . session . connectedAtlasCluster . projectId !== atlas . projectId ||
141
- this . session . connectedAtlasCluster . clusterName !== atlas . clusterName
142
- ) {
143
- throw new Error ( "Cluster connection aborted" ) ;
144
- }
145
-
146
138
try {
147
139
lastError = undefined ;
148
140
@@ -161,6 +153,14 @@ export class ConnectClusterTool extends AtlasToolBase {
161
153
162
154
await sleep ( 500 ) ; // wait for 500ms before retrying
163
155
}
156
+
157
+ if (
158
+ ! this . session . connectedAtlasCluster ||
159
+ this . session . connectedAtlasCluster . projectId !== atlas . projectId ||
160
+ this . session . connectedAtlasCluster . clusterName !== atlas . clusterName
161
+ ) {
162
+ throw new Error ( "Cluster connection aborted" ) ;
163
+ }
164
164
}
165
165
166
166
if ( lastError ) {
You can’t perform that action at this time.
0 commit comments