Skip to content

Commit

Permalink
Merge pull request #1659 from davidmoten/scan-fix
Browse files Browse the repository at this point in the history
OperatorScan should check for MAX_VALUE on request
  • Loading branch information
benjchristensen committed Sep 5, 2014
2 parents c1b77dc + 56983e6 commit 69fa2ff
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public void setProducer(final Producer producer) {
@Override
public void request(long n) {
if (once.compareAndSet(false, true)) {
if (initialValue == NO_INITIAL_VALUE) {
if (initialValue == NO_INITIAL_VALUE || n == Long.MAX_VALUE) {
producer.request(n);
} else {
producer.request(n - 1);
Expand Down

0 comments on commit 69fa2ff

Please sign in to comment.