From 8eebe6aec6a0fc15d7e693c226d3d7a8fc741ac9 Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Mon, 17 Jun 2024 19:52:55 +0200 Subject: [PATCH] refactor(NODE-6174): use client.s.options in session (#4134) --- src/sessions.ts | 2 +- test/unit/sessions.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sessions.ts b/src/sessions.ts index 20699d24ac..544bef897c 100644 --- a/src/sessions.ts +++ b/src/sessions.ts @@ -174,7 +174,7 @@ export class ClientSession extends TypedEventEmitter { 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; diff --git a/test/unit/sessions.test.ts b/test/unit/sessions.test.ts index f889ed9c6a..390b89233a 100644 --- a/test/unit/sessions.test.ts +++ b/test/unit/sessions.test.ts @@ -333,7 +333,7 @@ describe('Sessions - unit', function () { before(() => { serverSessionSymbol = getSymbolFrom( - new ClientSession({}, serverSessionPool, {}), + new ClientSession(client, serverSessionPool, {}), 'serverSession' ); });