Removed check on the HttpSender.content field, that could lead to

NullPointerExceptions.

Checking whether the content was last and then acting was not atomic,
and the action being executed is designed to be run concurrently,
so the check was not needed.
This commit is contained in:
Simone Bordet 2013-12-20 13:08:26 +01:00
parent f73d8a083c
commit 330e7f87d7

View File

@ -465,8 +465,7 @@ public abstract class HttpSender implements AsyncContentProvider.Listener
public boolean abort(Throwable failure)
{
RequestState current = requestState.get();
boolean abortable = isBeforeCommit(current) ||
isSending(current) && !content.isLast();
boolean abortable = isBeforeCommit(current) || isSending(current);
return abortable && anyToFailure(failure);
}