Skip to content

Commit

Permalink
Fix onbackpressurebuffer
Browse files Browse the repository at this point in the history
bug onCompleted
  • Loading branch information
Vinceveve authored Aug 30, 2017
1 parent 70f3565 commit dfa3256
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Rxnet/Operator/OnBackPressureBuffer.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ function ($next) {
// Add to queue
$this->queue->push($next);
},
[$this->subject, 'onError'],
[$this->subject, 'onCompleted']
[$this->subject, 'onError']
),
$scheduler
);
Expand All @@ -100,9 +99,10 @@ public function request()
// Queue is finished we can return to live stream
if ($this->queue->isEmpty()) {
$this->pending = false;
$this->subject->onCompleted();
return;
}
// Take element in order they have been inserted
$this->subject->onNext($this->queue->shift());
}
}
}

0 comments on commit dfa3256

Please sign in to comment.