Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'.
This commit is contained in:
commit
b8b88b238e
|
@ -53,6 +53,11 @@ public abstract class AbstractConnectionPool implements ConnectionPool, Dumpable
|
|||
this.requester = requester;
|
||||
}
|
||||
|
||||
protected HttpDestination getHttpDestination()
|
||||
{
|
||||
return destination;
|
||||
}
|
||||
|
||||
@ManagedAttribute(value = "The max number of connections", readonly = true)
|
||||
public int getMaxConnectionCount()
|
||||
{
|
||||
|
|
|
@ -40,7 +40,6 @@ public class MultiplexConnectionPool extends AbstractConnectionPool implements C
|
|||
{
|
||||
private static final Logger LOG = LoggerFactory.getLogger(MultiplexConnectionPool.class);
|
||||
|
||||
private final HttpDestination destination;
|
||||
private final Deque<Holder> idleConnections;
|
||||
private final Map<Connection, Holder> activeConnections;
|
||||
private int maxMultiplex;
|
||||
|
@ -48,7 +47,6 @@ public class MultiplexConnectionPool extends AbstractConnectionPool implements C
|
|||
public MultiplexConnectionPool(HttpDestination destination, int maxConnections, Callback requester, int maxMultiplex)
|
||||
{
|
||||
super(destination, maxConnections, requester);
|
||||
this.destination = destination;
|
||||
this.idleConnections = new ArrayDeque<>(maxConnections);
|
||||
this.activeConnections = new LinkedHashMap<>(maxConnections);
|
||||
this.maxMultiplex = maxMultiplex;
|
||||
|
@ -60,7 +58,7 @@ public class MultiplexConnectionPool extends AbstractConnectionPool implements C
|
|||
Connection connection = activate();
|
||||
if (connection == null)
|
||||
{
|
||||
int queuedRequests = destination.getQueuedRequestCount();
|
||||
int queuedRequests = getHttpDestination().getQueuedRequestCount();
|
||||
int maxMultiplex = getMaxMultiplex();
|
||||
int maxPending = ceilDiv(queuedRequests, maxMultiplex);
|
||||
tryCreate(maxPending);
|
||||
|
|
Loading…
Reference in New Issue