Skip to content

Commit 16da8dc

Browse files
author
freynaud
committed
Fix #6771 if a session times out and the browser was never started, it should still be cleaned up on the hub side.
BeforeRelease should then be a no-op and not throw.
1 parent 6be55b4 commit 16da8dc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

java/server/src/org/openqa/grid/selenium/proxy/DefaultRemoteProxy.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,9 @@ public DefaultRemoteProxy(RegistrationRequest request, Registry registry) {
7878
}
7979

8080
public void beforeRelease(TestSession session) {
81-
// release the resources remotely.
81+
// release the resources remotely if the remote started a browser.
8282
if (session.getExternalKey() == null) {
83-
throw new IllegalStateException(
84-
"cannot release the resources, they haven't been reserved properly.");
83+
return;
8584
}
8685
boolean ok = session.sendDeleteSessionRequest();
8786
if (!ok) {

0 commit comments

Comments
 (0)