I always get an exception when sending a message to a websocket (server -> client): https://gist.github.com/rauhs/7ec77945f94d7ddd40bb44ed253ba3dc
@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))
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)@jumar Thanks! I'm sometimes completely blind 🙂