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
(println "stopping object listener")
(async/close! mqtt-chan))
(try
(do (>! mqtt-chan
{:type :detection-event
:time (Instant/now)
:detection
(select-keys detection-event
[:location
:camera-id
:detect-time
:objects
:detection-url])})
(recur (<! obj-chan)))
(catch Exception e
(println (.toString e))))))
(do
(try
(>! mqtt-chan
{:type :detection-event
:time (Instant/now)
:detection
(select-keys detection-event
[:location
:camera-id
:detect-time
:objects
:detection-url])})
(catch Exception e
(println (.toString e))))
(recur (<! obj-chan)))))
(->SuanNiServer event-chan image-chan obj-chan listener)))