   (ws-msg {:type :repl/set-ns-complete :id id :ns ns}))
 
 (def close-reason-ref (volatile! nil))
+(def stale-client-detected (volatile! false))
 
 ;; FIXME: core.async-ify this
 (defn handle-message [{:keys [type] :as msg} done]

    (pr-str {:input text})
    #js {"content-type" "application/edn; charset=utf-8"}))

(defn ws-connect []
  (try
    (let [print-fn
          cljs.core/*print-fn*

    nil

    :client/stale
    (do
      (vreset! stale-client-detected true)
      (vreset! close-reason-ref "Stale Client! You are not using the latest compilation output!"))

    :client/no-worker
    (vreset! close-reason-ref (str "watch for build \"" env/build-id "\" not running"))
