Skip to content

Commit

Permalink
Merge branch '0.8.x' into 0.9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
violetagg committed Mar 23, 2020
2 parents e99eac1 + e53e712 commit 589ce17
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/reactor/netty/channel/FluxReceive.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
*/
final class FluxReceive extends Flux<Object> implements Subscription, Disposable {

static final int QUEUE_LOW_LIMIT = 32;

final Channel channel;
final ChannelOperations<?, ?> parent;
final EventLoop eventLoop;
Expand Down Expand Up @@ -254,7 +256,7 @@ final void drainReceiver() {
receiverFastpath = true;
}

if ((receiverDemand -= e) > 0L || e > 0L) {
if ((receiverDemand -= e) > 0L || (e > 0L && q.size() < QUEUE_LOW_LIMIT)) {
if (needRead) {
needRead = false;
channel.config()
Expand Down

0 comments on commit 589ce17

Please sign in to comment.