diff --git a/example-project/project.clj b/example-project/project.clj index 9094841..d4bc10c 100644 --- a/example-project/project.clj +++ b/example-project/project.clj @@ -1,4 +1,4 @@ -(defproject com.taoensso.examples.debug/sente "1.1.1-SNAPSHOT" +(defproject com.taoensso.examples/sente "1.1.1-SNAPSHOT" :description "Sente, reference web-app example project" :url "https://github.com/ptaoussanis/sente" :license {:name "Eclipse Public License" @@ -16,7 +16,7 @@ [org.clojure/clojurescript "0.0-2322"] [org.clojure/core.async "0.1.338.0-5c5012-alpha"] ;; - [com.taoensso.debug/sente "1.1.1-SNAPSHOT"] ; <--- Sente + [com.taoensso/sente "1.1.1-SNAPSHOT"] ; <--- Sente [com.taoensso/timbre "3.3.1"] ;; [http-kit "2.1.19"] ; <--- http-kit (currently required) diff --git a/project.clj b/project.clj index 80f2a3b..7a49f66 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject com.taoensso.debug/sente "1.1.1-SNAPSHOT" +(defproject com.taoensso/sente "1.1.1-SNAPSHOT" :author "Peter Taoussanis " :description "Clojure channel sockets library" :url "https://github.com/ptaoussanis/sente" @@ -17,9 +17,7 @@ [org.clojure/tools.reader "0.8.8"] [com.taoensso/encore "1.9.1"] [com.taoensso/timbre "3.3.1"] - [http-kit "2.1.19"] - [cider/cider-nrepl "0.7.0"] ; TODO Debugging #75 - ] + [http-kit "2.1.19"]] ;; :plugins ;; [[com.keminglabs/cljx "0.4.0"] diff --git a/src/taoensso/sente.cljx b/src/taoensso/sente.cljx index 8c81d7d..e7ba6e8 100644 --- a/src/taoensso/sente.cljx +++ b/src/taoensso/sente.cljx @@ -94,7 +94,7 @@ #+clj (timbre/set-level! level) #+cljs (reset! encore/logging-level level)) -(set-logging-level! :trace) ; For debugging +;; (set-logging-level! :trace) ; For debugging ;;;; Ajax @@ -307,29 +307,15 @@ connected-uids_ (atom {:ws #{} :ajax #{} :any #{}}) send-buffers_ (atom {:ws {} :ajax {}}) ; { [ <#{ev-uuids}>]} - _ (add-watch conns_ ::conns-trace - (fn [_ _ old new] - (when (not= old new) (tracef "conns_ change: %s" (str new))))) - - _ (add-watch connected-uids_ ::connected-uids-trace - (fn [_ _ old new] - (when (not= old new) (tracef "connected-uids_ change: %s" (str new))))) - connect-uid! (fn [type uid] (let [newly-connected? (encore/swap-in! connected-uids_ [] (fn [{:keys [ws ajax any] :as old-m}] - (assert (set? ws)) - (assert (set? ajax)) - (assert (set? any)) (let [new-m (case type :ws {:ws (conj ws uid) :ajax ajax :any (conj any uid)} :ajax {:ws ws :ajax (conj ajax uid) :any (conj any uid)})] - (assert (set? (:ws new-m))) - (assert (set? (:ajax new-m))) - (assert (set? (:any new-m))) (encore/swapped new-m (let [old-any (:any old-m) new-any (:any new-m)] @@ -343,9 +329,6 @@ (let [newly-disconnected? (encore/swap-in! connected-uids_ [] (fn [{:keys [ws ajax any] :as old-m}] - (assert (set? ws)) - (assert (set? ajax)) - (assert (set? any)) (let [conns' @conns_ any-ws-clients? (contains? (:ws conns') uid) any-ajax-clients? (contains? (:ajax conns') uid) @@ -355,9 +338,6 @@ {:ws (if any-ws-clients? (conj ws uid) (disj ws uid)) :ajax (if any-ajax-clients? (conj ajax uid) (disj ajax uid)) :any (if any-clients? (conj any uid) (disj any uid))}] - (assert (set? (:ws new-m))) - (assert (set? (:ajax new-m))) - (assert (set? (:any new-m))) (encore/swapped new-m (let [old-any (:any old-m) new-any (:any new-m)]