Skip to content

Commit 3cd0ede

Browse files
committed
update with timeout
1 parent c3ec428 commit 3cd0ede

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/operations/find.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ export class FindOperation extends CommandOperation<Document> {
114114
return await server.command(this.ns, findCommand, {
115115
...this.options,
116116
...this.bsonOptions,
117+
timeout: this.timeout,
117118
documentsReturnedIn: 'firstBatch',
118119
session
119120
});

src/operations/run_command.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ export type RunCommandOptions = {
1313
session?: ClientSession;
1414
/** The read preference */
1515
readPreference?: ReadPreferenceLike;
16+
/** @internal */
17+
timeoutMS?: number;
1618
} & BSONSerializeOptions;
1719

1820
/** @internal */
@@ -31,6 +33,7 @@ export class RunCommandOperation<T = Document> extends AbstractOperation<T> {
3133
const res: TODO_NODE_3286 = await server.command(this.ns, this.command, {
3234
...this.options,
3335
readPreference: this.readPreference,
36+
timeout: this.timeout,
3437
session
3538
});
3639
return res;

0 commit comments

Comments
 (0)