File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
java/src/org/openqa/selenium/grid/sessionqueue/local Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ public HttpResponse addToQueue(SessionRequest request) {
216
216
boolean sessionCreated = data .latch .await (requestTimeout .toMillis (), MILLISECONDS );
217
217
218
218
if (sessionCreated ) {
219
- result = data .result ;
219
+ result = data .getResult () ;
220
220
} else {
221
221
result = Either .left (new SessionNotCreatedException ("New session request timed out" ));
222
222
}
@@ -465,14 +465,18 @@ private class Data {
465
465
466
466
public final Instant endTime ;
467
467
private final CountDownLatch latch = new CountDownLatch (1 );
468
- public Either <SessionNotCreatedException , CreateSessionResponse > result ;
468
+ private Either <SessionNotCreatedException , CreateSessionResponse > result ;
469
469
private boolean complete ;
470
470
471
471
public Data (Instant enqueued ) {
472
472
this .endTime = enqueued .plus (requestTimeout );
473
473
this .result = Either .left (new SessionNotCreatedException ("Session not created" ));
474
474
}
475
475
476
+ public synchronized Either <SessionNotCreatedException , CreateSessionResponse > getResult () {
477
+ return result ;
478
+ }
479
+
476
480
public synchronized void setResult (
477
481
Either <SessionNotCreatedException , CreateSessionResponse > result ) {
478
482
if (complete ) {
You can’t perform that action at this time.
0 commit comments