From 3f618aa9851fd7ca4a8c4f00c06f35527f39cd99 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 1 Jul 2012 16:28:33 +0200 Subject: Fix swap!/reset! confusion. --- src/mulk/benki/main.clj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mulk/benki/main.clj b/src/mulk/benki/main.clj index 6908561..35f6e03 100644 --- a/src/mulk/benki/main.clj +++ b/src/mulk/benki/main.clj @@ -114,7 +114,7 @@ response)))) (defn init-config! [] - (swap! benki-config (read-string (slurp (.getFile (clojure.java.io/resource "config.sexp")))))) + (reset! benki-config (read-string (slurp (.getFile (clojure.java.io/resource "config.sexp")))))) (defn init-middleware! [] (noir.server/add-middleware #(ring.middleware.file-info/wrap-file-info %)) @@ -136,7 +136,7 @@ {:port (:web-port @benki-config) :websocket true}))) -(def server (atom nil)) +(defonce server (atom nil)) (defn init-security! [] (java.security.Security/addProvider @@ -153,7 +153,7 @@ ((ns-resolve 'mulk.benki.xmpp 'init-xmpp!))) (future (require 'mulk.benki.lazychat) ((ns-resolve 'mulk.benki.lazychat 'init-lazychat!))) - (future (swap! server (run-server)))) + (future (reset! server (run-server)))) (loop [] (Thread/sleep 1000000) (recur))) -- cgit v1.2.3