Skip to content

Commit 1965ed5

Browse files
fix(NODE-6523): deleteMany in gridfs passes timeoutMS to predicate, not options (#4319)
Co-authored-by: Neal Beeken <[email protected]>
1 parent db4eff5 commit 1965ed5

File tree

2 files changed

+197
-205
lines changed

2 files changed

+197
-205
lines changed

src/gridfs/upload.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,8 @@ export class GridFSBucketWriteStream extends Writable {
223223
const remainingTimeMS = this.timeoutContext?.getRemainingTimeMSOrThrow(
224224
`Upload timed out after ${this.timeoutContext?.timeoutMS}ms`
225225
);
226-
await this.chunks.deleteMany({ files_id: this.id, timeoutMS: remainingTimeMS });
226+
227+
await this.chunks.deleteMany({ files_id: this.id }, { timeoutMS: remainingTimeMS });
227228
}
228229
}
229230

0 commit comments

Comments
 (0)