Skip to content

Commit

Permalink
refactor(NODE-6174): use client.s.options in session (#4134)
Browse files Browse the repository at this point in the history
  • Loading branch information
durran authored Jun 17, 2024
1 parent 465ffd9 commit 8eebe6a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/sessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export class ClientSession extends TypedEventEmitter<ClientSessionEvents> {
this.sessionPool = sessionPool;
this.hasEnded = false;
this.clientOptions = clientOptions;
this.timeoutMS = options.defaultTimeoutMS ?? client.options?.timeoutMS;
this.timeoutMS = options.defaultTimeoutMS ?? client.s.options?.timeoutMS;

this.explicit = !!options.explicit;
this[kServerSession] = this.explicit ? this.sessionPool.acquire() : null;
Expand Down
2 changes: 1 addition & 1 deletion test/unit/sessions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ describe('Sessions - unit', function () {

before(() => {
serverSessionSymbol = getSymbolFrom(
new ClientSession({}, serverSessionPool, {}),
new ClientSession(client, serverSessionPool, {}),
'serverSession'
);
});
Expand Down

0 comments on commit 8eebe6a

Please sign in to comment.