Fixes #503 - Wrong request-per-connection counting in MultiplexHttpDestination in case of failures.
This commit is contained in:
parent
ac4ee8fec4
commit
11242ae1ec
|
@ -132,11 +132,11 @@ public abstract class MultiplexHttpDestination<C extends Connection> extends Htt
|
|||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Aborted before processing {}: {}", exchange, cause);
|
||||
requestsPerConnection.decrementAndGet();
|
||||
// It may happen that the request is aborted before the exchange
|
||||
// is created. Aborting the exchange a second time will result in
|
||||
// a no-operation, so we just abort here to cover that edge case.
|
||||
exchange.abort(cause);
|
||||
requestsPerConnection.decrementAndGet();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -145,12 +145,12 @@ public abstract class MultiplexHttpDestination<C extends Connection> extends Htt
|
|||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Send failed {} for {}", result, exchange);
|
||||
requestsPerConnection.decrementAndGet();
|
||||
if (result.retry)
|
||||
{
|
||||
if (enqueue(getHttpExchanges(), exchange))
|
||||
return true;
|
||||
}
|
||||
|
||||
request.abort(result.failure);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue