Merged branch 'jetty-9.2.x' into 'jetty-9.3.x'.
This commit is contained in:
commit
37388ef105
|
@ -184,9 +184,12 @@ public abstract class HttpDestination extends ContainerLifeCycle implements Dest
|
||||||
int port = request.getPort();
|
int port = request.getPort();
|
||||||
if (port >= 0 && getPort() != port)
|
if (port >= 0 && getPort() != port)
|
||||||
throw new IllegalArgumentException("Invalid request port " + port + " for destination " + this);
|
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 (client.isRunning())
|
||||||
{
|
{
|
||||||
if (enqueue(exchanges, exchange))
|
if (enqueue(exchanges, exchange))
|
||||||
|
|
|
@ -147,11 +147,9 @@ public abstract class MultiplexHttpDestination<C extends Connection> extends Htt
|
||||||
LOG.debug("Send failed {} for {}", result, exchange);
|
LOG.debug("Send failed {} for {}", result, exchange);
|
||||||
requestsPerConnection.decrementAndGet();
|
requestsPerConnection.decrementAndGet();
|
||||||
if (result.retry)
|
if (result.retry)
|
||||||
{
|
send(exchange);
|
||||||
if (enqueue(getHttpExchanges(), exchange))
|
else
|
||||||
return true;
|
request.abort(result.failure);
|
||||||
}
|
|
||||||
request.abort(result.failure);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return getHttpExchanges().peek() != null;
|
return getHttpExchanges().peek() != null;
|
||||||
|
|
|
@ -159,12 +159,9 @@ public abstract class PoolingHttpDestination<C extends Connection> extends HttpD
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
LOG.debug("Send failed {} for {}", result, exchange);
|
LOG.debug("Send failed {} for {}", result, exchange);
|
||||||
if (result.retry)
|
if (result.retry)
|
||||||
{
|
send(exchange);
|
||||||
if (enqueue(getHttpExchanges(), exchange))
|
else
|
||||||
return true;
|
request.abort(result.failure);
|
||||||
}
|
|
||||||
|
|
||||||
request.abort(result.failure);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return getHttpExchanges().peek() != null;
|
return getHttpExchanges().peek() != null;
|
||||||
|
|
Loading…
Reference in New Issue