From ff20442d0f1e7320126d3ae8b40e4b0f9456fffb Mon Sep 17 00:00:00 2001 From: "Alexander K. Hudek" Date: Mon, 8 Dec 2014 01:40:03 -0500 Subject: [PATCH] Previous agent-restart didn't work as expected. Using agent-mode instead. --- clj-browserchannel-jetty-adapter/project.clj | 4 ++-- clj-browserchannel-server/project.clj | 2 +- clj-browserchannel-server/src/net/thegeez/browserchannel.clj | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/clj-browserchannel-jetty-adapter/project.clj b/clj-browserchannel-jetty-adapter/project.clj index 4849f4d..bd1425f 100644 --- a/clj-browserchannel-jetty-adapter/project.clj +++ b/clj-browserchannel-jetty-adapter/project.clj @@ -1,10 +1,10 @@ -(defproject net.thegeez/clj-browserchannel-jetty-adapter "0.0.4" +(defproject net.thegeez/clj-browserchannel-jetty-adapter "0.0.5" :description "Jetty async adapter for BrowserChannel" :url "" :dependencies [[ring/ring-core "1.3.1"] [ring/ring-servlet "1.3.1"] [org.eclipse.jetty/jetty-server "8.1.16.v20140903"];; includes ssl - [net.thegeez/clj-browserchannel-server "0.0.8"]] + [net.thegeez/clj-browserchannel-server "0.0.9"]] :profiles {:provided {:dependencies [[org.clojure/clojure "1.6.0"]]}}) diff --git a/clj-browserchannel-server/project.clj b/clj-browserchannel-server/project.clj index 31414dd..63c5993 100644 --- a/clj-browserchannel-server/project.clj +++ b/clj-browserchannel-server/project.clj @@ -1,4 +1,4 @@ -(defproject net.thegeez/clj-browserchannel-server "0.0.8" +(defproject net.thegeez/clj-browserchannel-server "0.0.9" :description "BrowserChannel server implementation in Clojure" :dependencies [[ring/ring-core "1.3.1"] [org.clojure/data.json "0.2.5"]] diff --git a/clj-browserchannel-server/src/net/thegeez/browserchannel.clj b/clj-browserchannel-server/src/net/thegeez/browserchannel.clj index 80e8923..c6dfe64 100644 --- a/clj-browserchannel-server/src/net/thegeez/browserchannel.clj +++ b/clj-browserchannel-server/src/net/thegeez/browserchannel.clj @@ -133,8 +133,7 @@ "Prints the error and tries to restart the agent." [id] (fn [ag ^Exception e] - (println "ERROR:" id "agent threw" e (.getMessage e)) - (restart-agent ag @ag))) + (println "ERROR:" id "agent threw" e (.getMessage e)))) ;;;;;; end of utils @@ -145,6 +144,7 @@ ;; event: :map | :close (def listeners-agent (agent {})) (set-error-handler! listeners-agent (agent-error-handler-fn "listener")) +(set-error-mode! listeners-agent :continue) (defn add-listener [session-id event-key f] @@ -517,6 +517,7 @@ refresh-session-timeout) session-agent (agent session)] (set-error-handler! session-agent (agent-error-handler-fn (str "session-" (:id session)))) + (set-error-mode! session-agent :continue) (swap! sessions assoc id session-agent) (when-let [notify (:on-session options)] (notify id req))