Skip to content

Commit

Permalink
add ^js annotation on ws server to fix breaking optimizations; bump 0…
Browse files Browse the repository at this point in the history
….1.3
  • Loading branch information
ChenYong committed Jan 3, 2019
1 parent 183d1d6 commit d9023aa
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ws-edn adds a little abstraction to websocket
[![Clojars Project](https://img.shields.io/clojars/v/mvc-works/ws-edn.svg)](https://clojars.org/mvc-works/ws-edn)

```edn
[mvc-works/ws-edn "0.1.2"]
[mvc-works/ws-edn "0.1.3"]
```

```clojure
Expand Down
9 changes: 3 additions & 6 deletions calcit.edn

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion meyvn.edn
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

{:pom {:group-id "mvc-works",
:artifact-id "ws-edn",
:version "0.1.2",
:version "0.1.3",
:name "WebSocket wrapper in ClojureScript"}
:packaging {:jar {:enabled true
:remote-repository {:id "clojars"
Expand Down
4 changes: 3 additions & 1 deletion src/ws_edn/server.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@
(defn wss-serve! [port options]
(assert (number? port) "first argument is port")
(let [WebSocketServer (.-Server ws), wss (new WebSocketServer (js-obj "port" port))]
(.on wss "connection" (fn [socket] (maintain-socket! socket options)))
(.on ^js wss "connection" (fn [socket] (maintain-socket! socket options)))
(.on
^js
wss
"listening"
(fn [] (when-let [on-listening (:on-listening options)] (on-listening))))
(.on
^js
wss
"error"
(fn [error]
Expand Down

0 comments on commit d9023aa

Please sign in to comment.