Skip to content

Commit

Permalink
Make setOnReadyThreshold() noop by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
ran-su authored Mar 27, 2024
1 parent 2c5f0c2 commit ad2cc6f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package io.grpc.stub;

import static com.google.common.base.Preconditions.checkArgument;

import io.grpc.ExperimentalApi;

/**
Expand Down Expand Up @@ -140,7 +142,9 @@ public void disableAutoRequest() {
* @param onReadyHandler to call when peer is ready to receive more messages.
*/
@Override
public abstract void setOnReadyHandler(Runnable onReadyHandler);
public void setOnReadyHandler(Runnable onReadyHandler) {
checkArgument(numBytes > 0, "numBytes must be positive: %s", numBytes);
}

/**
* Requests the peer to produce {@code count} more messages to be delivered to the 'inbound'
Expand Down

0 comments on commit ad2cc6f

Please sign in to comment.