Skip to content
This repository
Browse code

Running -main now causes jetty to block, fixing a bug where lein woul…

…d prematurely call shutdown-agents for cleanup.
  • Loading branch information...
commit b6d6cca96a846c9b330d70798f1a02290072a04c 1 parent 715f849
Alex McNamara amcnamara authored

Showing 1 changed file with 5 additions and 2 deletions. Show diff stats Hide diff stats

  1. +5 2 src/foreclojure/core.clj
7 src/foreclojure/core.clj
@@ -11,6 +11,8 @@
11 11 (:require [compojure [route :as route] [handler :as handler]]
12 12 [sandbar.stateful-session :as session]))
13 13
  14 +(def *block-server* false)
  15 +
14 16 (defroutes main-routes
15 17 (GET "/" [] (welcome-page))
16 18 login-routes
@@ -39,7 +41,8 @@
39 41
40 42 (defn run []
41 43 (prepare-mongo)
42   - (run-jetty (var app) {:join? false :port 8080}))
  44 + (run-jetty (var app) {:join? *block-server* :port 8080}))
43 45
44 46 (defn -main [& args]
45   - (run))
  47 + (binding [*block-server* true]
  48 + (run)))

0 comments on commit b6d6cca

Please sign in to comment.
Something went wrong with that request. Please try again.