Skip to content

Commit

Permalink
fix quit fn for remote driver (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uunnamed authored Aug 25, 2020
1 parent aea0feb commit f041d19
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/etaoin/api.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3143,10 +3143,12 @@
(defn quit
"Closes the current session and stops the driver."
[driver]
(try
(disconnect-driver driver)
(finally
(stop-driver driver))))
(let [process (:process @driver)]
(try
(disconnect-driver driver)
(finally
(when process
(stop-driver driver))))))

(def firefox
"Launches Firefox driver. A shortcut for `boot-driver`."
Expand Down

0 comments on commit f041d19

Please sign in to comment.