File tree Expand file tree Collapse file tree
java/src/org/openqa/selenium/grid/node/local Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -157,11 +157,16 @@ private LocalNode(
157157 .expireAfterAccess (sessionTimeout )
158158 .ticker (ticker )
159159 .removalListener ((RemovalListener <SessionId , SessionSlot >) notification -> {
160- // Attempt to stop the session
161- LOG .log (Debug .getDebugLogLevel (), "Stopping session {0}" , notification .getKey ().toString ());
162- SessionSlot slot = notification .getValue ();
163- if (!slot .isAvailable ()) {
164- slot .stop ();
160+ if (notification .getKey () != null && notification .getValue () != null ) {
161+ // Attempt to stop the session
162+ LOG .log (Debug .getDebugLogLevel (), "Stopping session {0}" ,
163+ notification .getKey ().toString ());
164+ SessionSlot slot = notification .getValue ();
165+ if (!slot .isAvailable ()) {
166+ slot .stop ();
167+ }
168+ } else {
169+ LOG .log (Debug .getDebugLogLevel (), "Received stop session notification with null values" );
165170 }
166171 })
167172 .build ();
You can’t perform that action at this time.
0 commit comments