Skip to content

Commit 6381d42

Browse files
author
Stephane Landelle
committed
No need for contentProcessed flag, content is enough
1 parent 9b94add commit 6381d42

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ enum STATE {
7979
private final long start = millisTime();
8080
private final NettyAsyncHttpProvider asyncHttpProvider;
8181
private final AtomicReference<STATE> state = new AtomicReference<STATE>(STATE.NEW);
82-
private final AtomicBoolean contentProcessed = new AtomicBoolean(false);
8382
private Channel channel;
8483
private boolean reuseChannel = false;
8584
private final AtomicInteger currentRetry = new AtomicInteger(0);
@@ -269,7 +268,7 @@ private V getContent() throws ExecutionException {
269268
V update = content.get();
270269
// No more retry
271270
currentRetry.set(maxRetry);
272-
if (exEx.get() == null && !contentProcessed.getAndSet(true)) {
271+
if (exEx.get() == null && update == null) {
273272
try {
274273
update = asyncHandler.onCompleted();
275274
} catch (Throwable ex) {

0 commit comments

Comments
 (0)