Skip to content

Commit 5c977d4

Browse files
committed
[grid] We do not need to stop the session again
If we get a `SessionClosedEvent`, it means that the `SessionSlot` already stopped the session so there is no need to invoke `this.stop(id)` again.
1 parent d33e28f commit 5c977d4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

java/src/org/openqa/selenium/grid/node/local/LocalNode.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,7 @@ private LocalNode(
175175
regularly.submit(() -> bus.fire(new NodeHeartBeatEvent(getStatus())), heartbeatPeriod, heartbeatPeriod);
176176

177177
bus.addListener(SessionClosedEvent.listener(id -> {
178-
try {
179-
this.stop(id);
180-
} catch (NoSuchSessionException ignore) {
181-
}
178+
// Listen to session terminated events so we know when to fire the NodeDrainComplete event
182179
if (this.isDraining()) {
183180
int done = pendingSessions.decrementAndGet();
184181
if (done <= 0) {

0 commit comments

Comments
 (0)