[grid] Quitting driver before deleting session from grid
@@ -231,16 +231,15 @@ public void executeWebDriverCommand(HttpRequest req, HttpResponse resp) {
span.addTag("session.capabilities", slot.getSession().getCapabilities());
span.addTag("session.uri", slot.getSession().getUri());
- if (req.getMethod() == DELETE && req.getUri().equals("/session/" + id)) {
- stop(id);
- return;
- }
-
try {
slot.execute(req, resp);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
+
+ if (req.getMethod() == DELETE && req.getUri().equals("/session/" + id)) {
+ stop(id);
+ }
}
}
