Skip to content

Commit 77f9e41

Browse files
committed
If a driver has already been quit, do nothing.
We're really only going to make ourselves unhappy if we try and call `quit` multiple times if the session is already kaput.
1 parent e0ccbd5 commit 77f9e41

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,11 @@ public void close() {
489489
}
490490

491491
public void quit() {
492+
// no-op if session id is null. We're only going to make ourselves unhappy
493+
if (sessionId == null) {
494+
return;
495+
}
496+
492497
try {
493498
execute(DriverCommand.QUIT);
494499
} finally {

0 commit comments

Comments
 (0)