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' ); });