Skip to content

Commit 3b41e60

Browse files
committed
[grid] One call less when interacting with the queue
1 parent aa0733d commit 3b41e60

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

java/server/src/org/openqa/selenium/grid/distributor/local/LocalDistributor.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,10 +547,11 @@ public class NewSessionRunnable implements Runnable {
547547

548548
@Override
549549
public void run() {
550+
List<SessionRequestCapability> queueContents = sessionQueue.getQueueContents();
550551
if (rejectUnsupportedCaps) {
551-
checkMatchingSlot(sessionQueue.getQueueContents());
552+
checkMatchingSlot(queueContents);
552553
}
553-
int initialSize = sessionQueue.getQueueContents().size();
554+
int initialSize = queueContents.size();
554555
boolean retry = initialSize != 0;
555556

556557
while (retry) {

0 commit comments

Comments
 (0)