diff --git a/src/cmap/connection_pool.ts b/src/cmap/connection_pool.ts index 75ae14fd1b6..83d36adaf6b 100644 --- a/src/cmap/connection_pool.ts +++ b/src/cmap/connection_pool.ts @@ -388,7 +388,6 @@ export class ConnectionPool extends TypedEventEmitter { } } else { timeout = Timeout.expires(waitQueueTimeoutMS); - clearTimeout = true; } const waitQueueMember: WaitQueueMember = { diff --git a/src/error.ts b/src/error.ts index f997682cf1c..e26a96f40df 100644 --- a/src/error.ts +++ b/src/error.ts @@ -768,15 +768,6 @@ export class MongoOperationTimeoutError extends MongoRuntimeError { } } -/** - * @internal - */ -export class MongoOperationTimeoutError extends MongoRuntimeError { - override get name(): string { - return 'MongoOperationTimeoutError'; - } -} - /** * An error thrown when the user attempts to add options to a cursor that has already been * initialized diff --git a/src/operations/find.ts b/src/operations/find.ts index b9dd9a1bbc3..c5cf0da140c 100644 --- a/src/operations/find.ts +++ b/src/operations/find.ts @@ -112,7 +112,8 @@ export class FindOperation extends CommandOperation { ...this.options, ...this.bsonOptions, documentsReturnedIn: 'firstBatch', - sessiontimeout: this.timeout + session, + timeout: this.timeout }, undefined ); diff --git a/src/operations/operation.ts b/src/operations/operation.ts index 063a913fd6e..114980893af 100644 --- a/src/operations/operation.ts +++ b/src/operations/operation.ts @@ -67,9 +67,6 @@ export abstract class AbstractOperation { /** @internal */ timeoutMS?: number; - /** @internal */ - serverSelectionTimeout?: Timeout; - [kSession]: ClientSession | undefined; constructor(options: OperationOptions = {}) { diff --git a/src/sdam/topology.ts b/src/sdam/topology.ts index 115d6c5c0f3..4c9d71d807d 100644 --- a/src/sdam/topology.ts +++ b/src/sdam/topology.ts @@ -565,7 +565,6 @@ export class Topology extends TypedEventEmitter { } const serverSelectionTimeoutMS = options.serverSelectionTimeoutMS ?? 0; let timeout: Timeout | null; - if (options.timeout) { // CSOT Enabled if (options.timeout.duration > 0 || serverSelectionTimeoutMS > 0) { @@ -582,7 +581,6 @@ export class Topology extends TypedEventEmitter { } } else { timeout = Timeout.expires(serverSelectionTimeoutMS); - clearTimeout = true; } const isSharded = this.description.type === TopologyType.Sharded;