Skip to content

Commit

Permalink
Updates after review.
Browse files Browse the repository at this point in the history
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
  • Loading branch information
sbordet committed Jan 12, 2024
1 parent b19dc8a commit d724208
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1935,7 +1935,7 @@ private boolean onIdleTimeout()
goAwayFrame = goAwaySent;
closed = CloseState.CLOSING;
zeroStreamsAction = null;
failure = cause = new TimeoutException("Session idle timeout expired");
failure = cause = newTimeoutException();
}
case REMOTELY_CLOSED ->
{
Expand All @@ -1944,7 +1944,7 @@ private boolean onIdleTimeout()
goAwayFrame = goAwaySent;
closed = CloseState.CLOSING;
zeroStreamsAction = null;
failure = cause = new TimeoutException("Session idle timeout expired");
failure = cause = newTimeoutException();
}
default -> terminate = true;
}
Expand All @@ -1955,7 +1955,7 @@ private boolean onIdleTimeout()
if (LOG.isDebugEnabled())
LOG.debug("Already closed, ignored idle timeout for {}", HTTP2Session.this);
// Writes may be TCP congested, so termination never happened.
flusher.abort(new TimeoutException());
flusher.abort(newTimeoutException());
return false;
}

Expand All @@ -1977,6 +1977,11 @@ private boolean onIdleTimeout()
return false;
}

private TimeoutException newTimeoutException()
{
return new TimeoutException("Session idle timeout expired");
}

private void onSessionFailure(int error, String reason, Callback callback)
{
GoAwayFrame goAwayFrame;
Expand Down

0 comments on commit d724208

Please sign in to comment.