Skip to content

Commit 8da7c75

Browse files
run endSessions on admin.
1 parent 3bb0216 commit 8da7c75

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mongo_client.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ import {
6262
type HostAddress,
6363
hostMatchesWildcards,
6464
isHostMatch,
65-
type MongoDBNamespace,
65+
MongoDBNamespace,
6666
noop,
6767
ns,
6868
resolveOptions,
@@ -793,6 +793,7 @@ export class MongoClient extends TypedEventEmitter<MongoClientEvents> implements
793793
if (endSessions.length !== 0) {
794794
try {
795795
class EndSessionsOperation extends ModernizedOperation<void> {
796+
override ns = MongoDBNamespace.fromString('admin.$cmd');
796797
override SERVER_COMMAND_RESPONSE_TYPE = MongoDBResponse;
797798
override buildCommand(_connection: Connection, _session?: ClientSession): Document {
798799
return {

0 commit comments

Comments
 (0)