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,18 +130,19 @@
(when verbose (when verbose
(println "stopping object listener") (println "stopping object listener")
(async/close! mqtt-chan)) (async/close! mqtt-chan))
(try (do
(do (>! mqtt-chan (try
{:type :detection-event (>! mqtt-chan
:time (Instant/now) {:type :detection-event
:detection :time (Instant/now)
(select-keys detection-event :detection
[:location (select-keys detection-event
:camera-id [:location
:detect-time :camera-id
:objects :detect-time
:detection-url])}) :objects
(recur (<! obj-chan))) :detection-url])})
(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)))