Issue #4904 - WebsocketClient creates more connections than needed.
Fixed MultiplexConnectionPool.acquire() to use the new boolean parameter to decide whether or not create a new connection. This fixes ConnectionPoolTest instability. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
parent
7bcbc21ca9
commit
6844c9362d
|
@ -57,10 +57,10 @@ public class MultiplexConnectionPool extends AbstractConnectionPool implements C
|
|||
}
|
||||
|
||||
@Override
|
||||
public Connection acquire()
|
||||
protected Connection acquire(boolean create)
|
||||
{
|
||||
Connection connection = activate();
|
||||
if (connection == null)
|
||||
if (connection == null && create)
|
||||
{
|
||||
int queuedRequests = getHttpDestination().getQueuedRequestCount();
|
||||
int maxMultiplex = getMaxMultiplex();
|
||||
|
|
Loading…
Reference in New Issue