                chsk-router (sente/start-chsk-router! ch-recv event-handler)]
            (tap event-mult inspect-chan)
            (event-loop inspect-chan connected-uids send-fn)
+           (go-loop []
+                    (<! (timeout 10000))
+                    (>! inspect-chan [:send-stats])
+                    (recur))
            (assoc component
              :ajax-post-fn ajax-post-fn
              :ajax-get-or-ws-handshake-fn ajax-get-or-ws-handshake-fn

(defn event-loop
  "run loop, call chsk-send! with message on channel"
  [channel uids chsk-send!]
  (go-loop [] (match (<! channel)
                     [:event ev] (do
                                   (add-stats uids (:origin ev) chsk-send!)
                                   (deliver-msg uids ev chsk-send!))
                     [:close uid]  (swap! client-maps dissoc uid)
                     [:next uid client-map] (swap! client-maps assoc-in [uid] client-map))
           (recur)))

(defrecord Matcher [event-mult inspect-fn chsk-router]

  "send set with known event types to connected UIs"
  [uids chsk-send!]
  (doseq [uid (:any @uids)]
    (chsk-send! uid [:info/stats @stats]))
  (reset! stats (into {} (map (fn [[t _]] [t 0]) @stats))))

(defn- make-handler
  "create event handler function for the websocket connection"
