Merged branch 'jetty-9.2.x' into 'jetty-9.3.x'.

This commit is contained in:
Simone Bordet 2017-12-16 23:28:05 +01:00
commit 37388ef105
3 changed files with 11 additions and 13 deletions

View File

@ -184,9 +184,12 @@ public abstract class HttpDestination extends ContainerLifeCycle implements Dest
int port = request.getPort();
if (port >= 0 && getPort() != port)
throw new IllegalArgumentException("Invalid request port " + port + " for destination " + this);
send(new HttpExchange(this, request, listeners));
}
HttpExchange exchange = new HttpExchange(this, request, listeners);
public void send(HttpExchange exchange)
{
HttpRequest request = exchange.getRequest();
if (client.isRunning())
{
if (enqueue(exchanges, exchange))

View File

@ -147,11 +147,9 @@ public abstract class MultiplexHttpDestination<C extends Connection> extends Htt
LOG.debug("Send failed {} for {}", result, exchange);
requestsPerConnection.decrementAndGet();
if (result.retry)
{
if (enqueue(getHttpExchanges(), exchange))
return true;
}
request.abort(result.failure);
send(exchange);
else
request.abort(result.failure);
}
}
return getHttpExchanges().peek() != null;

View File

@ -159,12 +159,9 @@ public abstract class PoolingHttpDestination<C extends Connection> extends HttpD
if (LOG.isDebugEnabled())
LOG.debug("Send failed {} for {}", result, exchange);
if (result.retry)
{
if (enqueue(getHttpExchanges(), exchange))
return true;
}
request.abort(result.failure);
send(exchange);
else
request.abort(result.failure);
}
}
return getHttpExchanges().peek() != null;