Skip to content

Commit 68939d1

Browse files
committed
JAVA-2231: Never send a negative nToReturn value for OP_GET_MORE, as the 3.4 server will reject it.
1 parent fd39425 commit 68939d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/com/mongodb/QueryResultIterator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ private void getMore(){
150150
}
151151

152152
private int getGetMoreBatchSize() {
153-
return chooseBatchSize(_batchSize, _limit, _numFetched);
153+
return Math.abs(chooseBatchSize(_batchSize, _limit, _numFetched));
154154
}
155155

156156
public void remove(){

0 commit comments

Comments
 (0)