Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'.
This commit is contained in:
commit
113595254b
|
@ -92,10 +92,9 @@ public abstract class AbstractConnectionPool implements ConnectionPool, Dumpable
|
|||
public Connection acquire(boolean create)
|
||||
{
|
||||
Connection connection = activate();
|
||||
if (connection == null)
|
||||
if (connection == null && create)
|
||||
{
|
||||
if (create)
|
||||
tryCreate(destination.getQueuedRequestCount());
|
||||
tryCreate(destination.getQueuedRequestCount());
|
||||
connection = activate();
|
||||
}
|
||||
return connection;
|
||||
|
|
|
@ -175,6 +175,7 @@ public class MaxConcurrentStreamsTest extends AbstractTest
|
|||
@Override
|
||||
public void onSettings(Session session, SettingsFrame frame)
|
||||
{
|
||||
super.onSettings(session, frame);
|
||||
// Send another request to simulate a request being
|
||||
// sent concurrently with connection establishment.
|
||||
// Sending this request will trigger the creation of
|
||||
|
@ -199,7 +200,6 @@ public class MaxConcurrentStreamsTest extends AbstractTest
|
|||
}
|
||||
});
|
||||
}
|
||||
super.onSettings(session, frame);
|
||||
}
|
||||
}, promise, context);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue