Skip to content

Commit

Permalink
Fix OBOB and make log message and var names more accurate
Browse files Browse the repository at this point in the history
  • Loading branch information
dgr committed Oct 8, 2024
1 parent 4c6a172 commit f65f86f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/etaoin/api.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3548,7 +3548,7 @@
(drv/set-capabilities (get-in defaults [type :capabilities]))
(drv/set-capabilities capabilities)))
caps (:capabilities driver)
max-retries 3]
max-tries 3]
(loop [n 1]
;; Wait for driver to be ready before creating the first session.
(wait-predicate
Expand Down Expand Up @@ -3577,8 +3577,8 @@
driver
(do
(delete-session driver)
(if (< n max-retries) ; max attempts = 3
(do (log/warnf e "Bad session detected. Retrying %d/%d" n max-retries)
(if (<= n max-tries) ; max total tries = 3
(do (log/warnf e "Bad session detected. Try again %d/%d." (inc n) max-tries)
(recur (inc n)))
(throw+ {:type :etaoin/retries
:message "Could not create a good session after multiple retries"}
Expand Down

0 comments on commit f65f86f

Please sign in to comment.