Skip to content

Commit 6d49b23

Browse files
committed
remove src changes
1 parent 6681261 commit 6d49b23

File tree

3 files changed

+0
-35
lines changed

3 files changed

+0
-35
lines changed

src/mongo_client.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -673,23 +673,6 @@ export class MongoClient extends TypedEventEmitter<MongoClientEvents> {
673673
getLogger(): Logger {
674674
return this.s.logger;
675675
}
676-
677-
/** @internal */
678-
async endSessions(sessions: Iterable<ServerSession>) {
679-
if (this.topology == null) {
680-
return;
681-
}
682-
683-
const endSessions = Array.from(sessions, ({ id }) => id);
684-
685-
if (endSessions.length <= 0) {
686-
return;
687-
}
688-
689-
await this.db('admin')
690-
.command({ endSessions }, { readPreference: ReadPreference.primaryPreferred })
691-
.catch(() => null);
692-
}
693676
}
694677

695678
/**

src/sdam/topology.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -735,19 +735,6 @@ export class Topology extends TypedEventEmitter<TopologyEvents> {
735735
set clusterTime(clusterTime: ClusterTime | undefined) {
736736
this.s.clusterTime = clusterTime;
737737
}
738-
739-
async destroy(options: DestroyOptions) {
740-
await Promise.all(
741-
Array.from(this.s.servers.values(), server => promisify(destroyServer)(server, this, options))
742-
);
743-
744-
this.s.servers.clear();
745-
746-
// emit an event for close
747-
this.emit(Topology.TOPOLOGY_CLOSED, new TopologyClosedEvent(this.s.id));
748-
749-
stateTransition(this, STATE_CLOSED);
750-
}
751738
}
752739

753740
/** Destroys a server, and removes all event listeners from the instance */

src/sessions.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -880,11 +880,6 @@ export class ServerSession {
880880
export class ServerSessionPool {
881881
client: MongoClient;
882882
sessions: ServerSession[];
883-
/**
884-
* We keep a reference to the sessions that are acquired from the pool
885-
* so we can end them at client.close time. This may be incorrect.
886-
*/
887-
activeSessions: Set<ServerSession>;
888883

889884
constructor(client: MongoClient) {
890885
if (client == null) {

0 commit comments

Comments
 (0)