Skip to content

Commit

Permalink
build fix 3
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Kec <[email protected]>
  • Loading branch information
danielkec committed Nov 22, 2024
1 parent fabe998 commit d95da55
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,12 @@ public void triggerUpdate() {
@Override
public void blockTillUpdate() {
var startTime = System.currentTimeMillis();
int backoff = 50;
while (getRemainingWindowSize() < 1) {
try {
updatedSemaphore.drainPermits();
var ignored = updatedSemaphore.tryAcquire(timeoutMillis / 4, TimeUnit.MILLISECONDS);
var ignored = updatedSemaphore.tryAcquire(Math.min(backoff, 5000), TimeUnit.MILLISECONDS);
backoff *= 2;
} catch (InterruptedException e) {
debugLog("%s OFC STR %d: Window depleted, waiting for update interrupted.", e);
throw new Http2Exception(Http2ErrorCode.FLOW_CONTROL, "Flow control update wait interrupted.");
Expand Down

0 comments on commit d95da55

Please sign in to comment.