                        { :msg-name msg-name 
                          :project-id (:unique-id opts)})))
 
-(defn setup-file-change-sender [{:keys [file-change-atom compile-wait-time] :as server-state}
+(defn setup-file-change-sender [{:keys [file-change-atom compile-wait-time connection-count] :as server-state}
                                 wschannel]
   (let [watch-key (keyword (gensym "message-watch-"))]
+    (swap! connection-count inc)
     (add-watch file-change-atom
                watch-key
                (fn [_ _ o n]

                       (send! wschannel (prn-str msg)))))))
    
    (on-close wschannel (fn [status]
                          (remove-watch file-change-atom watch-key)
                          (println "Figwheel: client disconnected " status)))

    (on-receive wschannel (fn [data] (handle-client-msg server-state data)))



(defn stop-server [{:keys [http-server]}]
  (http-server))

