is there a way to list started states?
hmm I could just deref the state
I'm getting weird behaviour for my web-server state
(defn- start-web-server
"Starts web server at port. Returns web server connection."
[handler port]
(timbre/infof "Starting web server on port %d..." port)
(http/start-server handler {:port port}))
(defn- stop-web-server
"Stops web server"
[conn]
(timbre/info "Stopping webserver...")
(.close conn))
(defstate web-server
:start (start-web-server handler (Integer. (env :http-port)))
:end (stop-web-server web-server))
start works perfectly, and the log prints
but when i do mount/stop
the log doesn't print, and the state still becomes NotStartedState
so when I start it again I get bind address in use
you have :end
instead of :stop
oh wow thanks for the catch haha
no problem
@lgastako: thanks for chiming in :simple_smile:
@jethroksy: in case you are in clj
land, you can look at mount.tools.graph
:https://github.com/tolitius/mount/issues/12#issuecomment-167150505