Skip to content

Commit

Permalink
#11932 fix H3 message flusher
Browse files Browse the repository at this point in the history
Signed-off-by: Ludovic Orban <[email protected]>
  • Loading branch information
lorban authored and olamy committed Jun 26, 2024
1 parent b9a2308 commit 21c9111
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ protected Action process()
return Action.SCHEDULED;
}

// TODO this should be onSuccess()
@Override
protected void onSuccess()
public void succeeded()
{
if (LOG.isDebugEnabled())
LOG.debug("succeeded to write {} on {}", entry, this);
Expand All @@ -98,20 +99,23 @@ protected void onSuccess()

entry.callback.succeeded();
entry = null;

super.succeeded();
}

@Override
protected void onCompleteFailure(Throwable cause)
public void failed(Throwable x)
{
if (LOG.isDebugEnabled())
LOG.debug("failed to write {} on {}", entry, this, cause);
LOG.debug("failed to write {} on {}", entry, this, x);

accumulator.release();

entry.callback.failed(cause);
entry.callback.failed(x);
entry = null;

// Continue the iteration.
// TODO this is pure evil!
super.succeeded();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ else if (notifyCompleteFailure != null)
* to call {@code super.succeeded()}.
*/
@Override
public final void succeeded()
public void succeeded()
{
boolean process = false;
try (AutoLock ignored = _lock.lock())
Expand Down Expand Up @@ -409,7 +409,7 @@ public final void succeeded()
* @see #isFailed()
*/
@Override
public final void failed(Throwable x)
public void failed(Throwable x)
{
boolean failure = false;
try (AutoLock ignored = _lock.lock())
Expand Down

0 comments on commit 21c9111

Please sign in to comment.