Skip to content

Commit 0a77b97

Browse files
committed
chore: small refactor
1 parent cc92766 commit 0a77b97

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/common/session.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ export class Session extends EventEmitter<SessionEvents> {
6464
}
6565

6666
async disconnect(): Promise<void> {
67-
const currentConnection = this.connectionManager.currentConnectionState;
68-
const atlasCluster =
69-
currentConnection.tag === "connected" ? currentConnection.connectedAtlasCluster : undefined;
67+
const atlasCluster = this.connectedAtlasCluster;
7068

7169
try {
7270
await this.connectionManager.disconnect();

0 commit comments

Comments
 (0)