Skip to content

Commit 55e08e7

Browse files
aditi-khare-mongoDBW-A-Jamesnbbeekenbaileympearson
authored andcommitted
feat(NODE-6390): Add timeoutMS support to auto encryption (#4265)
Co-authored-by: Warren James <[email protected]> Co-authored-by: Neal Beeken <[email protected]> Co-authored-by: Bailey Pearson <[email protected]>
1 parent b48b7af commit 55e08e7

File tree

6 files changed

+491
-20
lines changed

6 files changed

+491
-20
lines changed

src/client-side-encryption/auto_encrypter.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ export class AutoEncrypter {
395395
socketOptions: autoSelectSocketOptions(this._client.options)
396396
});
397397

398-
return deserialize(await stateMachine.execute(this, context), {
398+
return deserialize(await stateMachine.execute(this, context, options.timeoutContext), {
399399
promoteValues: false,
400400
promoteLongs: false
401401
});
@@ -416,7 +416,11 @@ export class AutoEncrypter {
416416
socketOptions: autoSelectSocketOptions(this._client.options)
417417
});
418418

419-
return await stateMachine.execute(this, context);
419+
return await stateMachine.execute(
420+
this,
421+
context,
422+
options.timeoutContext?.csotEnabled() ? options.timeoutContext : undefined
423+
);
420424
}
421425

422426
/**

0 commit comments

Comments
 (0)