Skip to content

Commit ab2e774

Browse files
committed
[grid] Node server graceful shutdown
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent 9af3d6e commit ab2e774

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

java/src/org/openqa/selenium/grid/node/httpd/NodeServer.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
import org.openqa.selenium.grid.config.Role;
5151
import org.openqa.selenium.grid.data.NodeAddedEvent;
5252
import org.openqa.selenium.grid.data.NodeDrainComplete;
53-
import org.openqa.selenium.grid.data.NodeRemovedEvent;
5453
import org.openqa.selenium.grid.data.NodeStatusEvent;
5554
import org.openqa.selenium.grid.log.LoggingOptions;
5655
import org.openqa.selenium.grid.node.HealthCheck;
@@ -77,8 +76,7 @@ public class NodeServer extends TemplateGridServerCommand {
7776
private final AtomicBoolean nodeRegistered = new AtomicBoolean(false);
7877
private Node node;
7978
private EventBus bus;
80-
private final Thread shutdownHook =
81-
new Thread(() -> bus.fire(new NodeRemovedEvent(node.getStatus())));
79+
private final Thread shutdownHook = new Thread(() -> node.drain());
8280

8381
@Override
8482
public String getName() {

0 commit comments

Comments
 (0)