immutant

http://immutant.org Note: dev discussion happens in #immutant on FreeNode IRC.
rauh 2017-03-21T07:17:56.469080Z

I always get an exception when sending a message to a websocket (server -> client): https://gist.github.com/rauhs/7ec77945f94d7ddd40bb44ed253ba3dc

jumar 2017-03-21T12:09:03.233096Z

@rauh it seems that the destructuring in :on-close handler is wrong

(fn [ch & {:keys [code reason]}]
   (swap! channels disj ch))
should probably be
(fn [ch {:keys [code reason]}]
   (swap! channels disj ch))

jumar 2017-03-21T12:09:44.242514Z

It helps to look at part of stacktrace saying that:

java.lang.IllegalArgumentException: No value supplied for key: {:code 1001, :reason ""}
	at clojure.lang.PersistentHashMap.create(PersistentHashMap.java:77)
	at srs_s.services.live_reload$handle_request$fn__65888.doInvoke(live_reload.clj:40)
(line 40)

rauh 2017-03-21T12:35:21.608298Z

@jumar Thanks! I'm sometimes completely blind 🙂