Cannot 'recur' within 'try'

This commit is contained in:
niten 2023-06-07 13:30:13 -07:00
parent 4e3fa0914a
commit 14267d15db
1 changed files with 15 additions and 14 deletions

View File

@ -130,8 +130,9 @@
(when verbose (when verbose
(println "stopping object listener") (println "stopping object listener")
(async/close! mqtt-chan)) (async/close! mqtt-chan))
(do
(try (try
(do (>! mqtt-chan (>! mqtt-chan
{:type :detection-event {:type :detection-event
:time (Instant/now) :time (Instant/now)
:detection :detection
@ -141,7 +142,7 @@
:detect-time :detect-time
:objects :objects
:detection-url])}) :detection-url])})
(recur (<! obj-chan)))
(catch Exception e (catch Exception e
(println (.toString e)))))) (println (.toString e))))
(recur (<! obj-chan)))))
(->SuanNiServer event-chan image-chan obj-chan listener))) (->SuanNiServer event-chan image-chan obj-chan listener)))