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())
|
if (LOG.isDebugEnabled())
|
||||||
LOG.debug("Aborted before processing {}: {}", exchange, cause);
|
LOG.debug("Aborted before processing {}: {}", exchange, cause);
|
||||||
|
requestsPerConnection.decrementAndGet();
|
||||||
// It may happen that the request is aborted before the exchange
|
// It may happen that the request is aborted before the exchange
|
||||||
// is created. Aborting the exchange a second time will result in
|
// is created. Aborting the exchange a second time will result in
|
||||||
// a no-operation, so we just abort here to cover that edge case.
|
// a no-operation, so we just abort here to cover that edge case.
|
||||||
exchange.abort(cause);
|
exchange.abort(cause);
|
||||||
requestsPerConnection.decrementAndGet();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -145,12 +145,12 @@ public abstract class MultiplexHttpDestination<C extends Connection> extends Htt
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
LOG.debug("Send failed {} for {}", result, exchange);
|
LOG.debug("Send failed {} for {}", result, exchange);
|
||||||
|
requestsPerConnection.decrementAndGet();
|
||||||
if (result.retry)
|
if (result.retry)
|
||||||
{
|
{
|
||||||
if (enqueue(getHttpExchanges(), exchange))
|
if (enqueue(getHttpExchanges(), exchange))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
request.abort(result.failure);
|
request.abort(result.failure);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue