File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -141,11 +141,14 @@ export class ConnectionManager extends EventEmitter<ConnectionManagerEvents> {
141141 try {
142142 await this . state . serviceProvider ?. close ( true ) ;
143143 } finally {
144- this . changeState ( "connection-closed" , { tag : "disconnected" } ) ;
144+ this . changeState ( "connection-closed" , {
145+ tag : "disconnected" ,
146+ connectedAtlasCluster : this . state . connectedAtlasCluster ,
147+ } ) ;
145148 }
146149 }
147150
148- return { tag : "disconnected" } ;
151+ return { tag : "disconnected" , connectedAtlasCluster : this . state . connectedAtlasCluster } ;
149152 }
150153
151154 get currentConnectionState ( ) : AnyConnectionState {
Original file line number Diff line number Diff line change @@ -45,7 +45,6 @@ export class ConnectClusterTool extends AtlasToolBase {
4545 } else {
4646 return "connected" ;
4747 }
48- break ;
4948 case "connecting" :
5049 case "disconnected" : // we might still be calling Atlas APIs and not attempted yet to connect to MongoDB, but we are still "connecting"
5150 return "connecting" ;
@@ -57,7 +56,6 @@ export class ConnectClusterTool extends AtlasToolBase {
5756 ) ;
5857 return "unknown" ;
5958 }
60- return "unknown" ;
6159 }
6260
6361 private async prepareClusterConnection (
You can’t perform that action at this time.
0 commit comments