Skip to content

Commit eebe5c9

Browse files
authored
Merge pull request globalsign#24 from joomcode/hotfix/add-cursor-maxtime-in-change-stream
Propagate timeout to cursor in collection Watch
2 parents e97cd4a + 0c589b2 commit eebe5c9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

changestreams.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ func (coll *Collection) Watch(pipeline interface{},
6767
csPipe := constructChangeStreamPipeline(pipeline, options)
6868
pipe := coll.Pipe(&csPipe)
6969
if options.MaxAwaitTimeMS > 0 {
70+
pipe.SetCursorMaxTime(options.MaxAwaitTimeMS)
7071
pipe.SetMaxTime(options.MaxAwaitTimeMS)
7172
}
7273
if options.BatchSize > 0 {

0 commit comments

Comments
 (0)