Skip to content

Commit

Permalink
Fixes #4904 - WebsocketClient creates more connections than needed.
Browse files Browse the repository at this point in the history
Updates after review.

Signed-off-by: Simone Bordet <[email protected]>
  • Loading branch information
sbordet committed Jun 1, 2020
1 parent 00d5b6e commit 8b26507
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -465,16 +465,14 @@ public boolean remove(Connection connection)
{
tryRemoveIdleDestination();
}
else
else if (removed)
{
// We need to execute queued requests
// even if this connection was removed.
// Process queued requests that may be waiting.
// We may create a connection that is not
// needed, but it will eventually idle timeout.
if (removed)
process(true);
process(true);
}
return connectionPool.remove(connection);
return removed;
}

public void close(Connection connection)
Expand Down

0 comments on commit 8b26507

Please sign in to comment.