From 75223cd29aea2e5f35eba715bbd6008e5c8396a7 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 9 Feb 2021 01:27:42 +0100 Subject: 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. --- l/src/main.lisp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'l/src/main.lisp') 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*) -- cgit v1.2.3