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) {
216216 boolean sessionCreated = data .latch .await (requestTimeout .toMillis (), MILLISECONDS );
217217
218218 if (sessionCreated ) {
219- result = data .result ;
219+ result = data .getResult () ;
220220 } else {
221221 result = Either .left (new SessionNotCreatedException ("New session request timed out" ));
222222 }
@@ -465,14 +465,18 @@ private class Data {
465465
466466 public final Instant endTime ;
467467 private final CountDownLatch latch = new CountDownLatch (1 );
468- public Either <SessionNotCreatedException , CreateSessionResponse > result ;
468+ private Either <SessionNotCreatedException , CreateSessionResponse > result ;
469469 private boolean complete ;
470470
471471 public Data (Instant enqueued ) {
472472 this .endTime = enqueued .plus (requestTimeout );
473473 this .result = Either .left (new SessionNotCreatedException ("Session not created" ));
474474 }
475475
476+ public synchronized Either <SessionNotCreatedException , CreateSessionResponse > getResult () {
477+ return result ;
478+ }
479+
476480 public synchronized void setResult (
477481 Either <SessionNotCreatedException , CreateSessionResponse > result ) {
478482 if (complete ) {
You can’t perform that action at this time.
0 commit comments