Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
revert spotbugs problem change
Browse files Browse the repository at this point in the history
  • Loading branch information
gaoran10 committed Jul 12, 2023
1 parent 234ce4d commit 11f3393
Showing 1 changed file with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,11 @@ private synchronized void discardReader(Reader<ByteBuffer> oldReader) {
if (reader == null) {
return;
}
if (reader.isDone() && !reader.isCompletedExceptionally()) {
Reader<ByteBuffer> newReader = null;
try {
newReader = reader.get(0, TimeUnit.MILLISECONDS);
if (newReader == oldReader) {
log.info("discard broken reader for {}", topic);
reader = null;
}
} catch (Exception exception) {
log.warn("Failed to get reader handle for topic {}, discard the reader.", topic, exception);
reader = null;
}
if (reader.isCompletedExceptionally() || (reader.isDone()
&& !reader.isCompletedExceptionally()
&& reader.getNow(null) == oldReader)) {
log.info("discard broken reader for {}", topic);
reader = null;
}
}

Expand Down

0 comments on commit 11f3393

Please sign in to comment.