Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'.

This commit is contained in:
Simone Bordet 2020-07-09 16:19:24 +02:00
commit 113595254b
2 changed files with 3 additions and 4 deletions

View File

@ -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;

View File

@ -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);
}