taoensso / sente

Realtime web comms library for Clojure/Script
https://www.taoensso.com/sente
Eclipse Public License 1.0
1.74k stars 193 forks source link

`chsk-send!` function overloads not working properly #324

Closed ignorabilis closed 5 years ago

ignorabilis commented 6 years ago

Hi,

We are having an issue with chsk-send! with versions 1.11.0 & 1.12.0 (not tested with previous versions).

So basically this works and we get the request on the server:

(sockets/chsk-send!
      [ws-handler ws-data]
      timeout
      (fn no-op []))

and this one does not:

(sockets/chsk-send!
      [ws-handler ws-data])

The setup is as per the documentation:

(let [{:keys [chsk ch-recv send-fn state]}
        (sente/make-channel-socket! "/chsk" {:type :auto})]
    (def chsk chsk)
    (def ch-chsk ch-recv)
    (def chsk-send! send-fn)
    (def chsk-state state))
ptaoussanis commented 5 years ago

Hi Ivan!

Only had a chance to skim this. Seems quite strange; the 2-argument variation just calls through to the other.

and this one does not:

When you say "does not" [work], you mean the server never receives the request?

Could you maybe provide a minimal reproducible case?