log eventual network errors on QML auto reload for mobile

This commit is contained in:
pls.153 2022-06-18 12:23:40 +02:00
parent 170548dbc8
commit 3cc11cbe4d
2 changed files with 12 additions and 6 deletions

View file

@ -37,9 +37,12 @@
(let ((secs 0)
(ini t))
(defun auto-reload-qml ()
(let ((curr/file (ignore-errors
(multiple-value-bind (curr/file error)
(ignore-errors
(x:split (curl (x:cc *remote-ip* "cgi-bin/qml-last-modified.py"))
#.(coerce (list #\Return #\Newline) 'string)))))
#.(coerce (list #\Return #\Newline) 'string)))
(when error
(qlog :auto-reload-qml :error error))
(when (= 2 (length curr/file))
(destructuring-bind (curr file)
curr/file

View file

@ -23,9 +23,12 @@
(let ((secs 0)
(ini t))
(defun auto-reload-qml ()
(let ((curr (ignore-errors
(multiple-value-bind (curr error)
(ignore-errors
(parse-integer
(curl (x:cc *remote-ip* "cgi-bin/qml-last-modified.py"))))))
(curl (x:cc *remote-ip* "cgi-bin/qml-last-modified.py"))))
(when error
(qlog :auto-reload-qml :error error))
(when (and curr (/= secs curr))
(when (plusp secs)
(if ini