Merged branch 'jetty-9.3.x' into 'jetty-9.4.x'.
This commit is contained in:
commit
b68fbc4cfb
|
@ -236,9 +236,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))
|
||||
|
@ -335,12 +338,9 @@ public abstract class HttpDestination extends ContainerLifeCycle implements Dest
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue