                        (assoc comm :respond respond)))
     (when @has-messages (long-poll-send comm-atom nil))))
 
-;; TODO this si an abstract part of sending a message and getting a
+;; TODO this is an abstract part of sending a message and getting a
 ;; response
 (defn ping [conn]
   (let [prom (promise)

;; http async polling - long polling
;; ------------------------------------------------------------------

;; TODO explore shorter long polling timeouts
;; TODO make long polling client reconnect when server isn't present
;; TODO perhaps different endpoint for long polling?

;; TODO probably better to base the simple polling on a similar pattern

;; agents would be easier but heavier and agent clean up is harder
(defn long-poll-send [comm-atom msg]
  (let [data (volatile! nil)

(defn debug [msg]
  (glog/log logger goog.debug.Logger.Level.FINEST msg))

;; TODO dev
(.setLevel logger goog.debug.Logger.Level.FINE #_ST )

;; --------------------------------------------------------------
