aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2021-02-09 01:27:42 +0100
committerTeddy Wing2021-02-09 01:27:42 +0100
commit75223cd29aea2e5f35eba715bbd6008e5c8396a7 (patch)
tree086a5328466d368498612afa6b226cebe4f2f8d1
parentd9ff4ccbd3b42ffee3660c611bc005faec13b90f (diff)
downloadextreload-75223cd29aea2e5f35eba715bbd6008e5c8396a7.tar.bz2
Keep trying to reload tab until it succeeds
If we reload the active tab and it fails, we'll get an error response back. Keep trying to reload the page until we no longer get the error.
-rw-r--r--l/src/main.lisp6
1 files changed, 5 insertions, 1 deletions
diff --git a/l/src/main.lisp b/l/src/main.lisp
index 411f3eb..ab765fb 100644
--- a/l/src/main.lisp
+++ b/l/src/main.lisp
@@ -90,11 +90,15 @@
; (= current-call-id
; (id *devtools-root-call-id*)))
;
- (sleep 1)
+ ; (sleep 1)
(reload-tab (json-obj-get
(json-obj-get response "result")
"sessionId"))))
+ ;; Failed to reload tab.
+ (when (jsown:keyp (json-obj-get response "result") "exceptionDetails")
+ (reload-tab (json-obj-get response "sessionId")))
+
(format t "Response: ~a~%" response)
(format t "~a~%" *wg*)