Skip to content

Commit

Permalink
Merge pull request #2752 from vibe-d/fix_getmore_error
Browse files Browse the repository at this point in the history
Fix getMore database error on MongoDB 4.4
  • Loading branch information
l-kramer authored Oct 15, 2023
2 parents 78e37d1 + 35ac495 commit 5e1f07c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mongodb/vibe/db/mongo/connection.d
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,8 @@ final class MongoConnection {
command["getMore"] = Bson(cursor_id);
command["$db"] = Bson(database);
command["collection"] = Bson(collection_name);
command["batchSize"] = Bson(nret);
if (nret > 0)
command["batchSize"] = Bson(nret);
if (timeout != Duration.max && timeout.total!"msecs" < int.max)
command["maxTimeMS"] = Bson(cast(int)timeout.total!"msecs");

Expand Down

0 comments on commit 5e1f07c

Please sign in to comment.