Reset collected traces after every callback has had them delivered

Previously only the first tracing callback would get them.
This commit is contained in:
Daniel Compton 2018-01-16 16:14:31 +13:00
parent 8da17fb016
commit 5271019f4a
1 changed files with 3 additions and 3 deletions

View File

@ -53,14 +53,14 @@
(def run-tracing-callbacks!
(debounce
(fn []
(fn tracing-cb-debounced []
(doseq [[k cb] @trace-cbs]
(try (cb @traces)
#?(:clj (catch Exception e
(console :error "Error thrown from trace cb" k "while storing" @traces e)))
#?(:cljs (catch :default e
(console :error "Error thrown from trace cb" k "while storing" @traces e))))
(reset! traces [])))
(console :error "Error thrown from trace cb" k "while storing" @traces e)))))
(reset! traces []))
50))