412814 - HttpClient calling CompleteListener.onComplete() twice.
The problem was stemming from the HttpSender completing the response, but the response was actually completed by HttpReceiver, resulting in the double call to onComplete(). Now HttpSender checks whether it was able to complete the response, and only in that case calls the onComplete() callback.
This commit is contained in:
parent
4837b75eec
commit
108aa247b4
|
@ -540,10 +540,14 @@ public class HttpSender implements AsyncContentProvider.Listener
|
|||
boolean notCommitted = isBeforeCommit(current);
|
||||
if (result == null && notCommitted && request.getAbortCause() == null)
|
||||
{
|
||||
result = exchange.responseComplete(failure).getReference();
|
||||
completion = exchange.responseComplete(failure);
|
||||
if (completion.isMarked())
|
||||
{
|
||||
result = completion.getReference();
|
||||
exchange.terminateResponse();
|
||||
LOG.debug("Failed on behalf {}", exchange);
|
||||
}
|
||||
}
|
||||
|
||||
if (result != null)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue