After some more digging[1], I see that the client can call
(sente/chsk-reconnect!
<my-chsk>) to disconnect (and then reconnect) a connection.
Looking at the comments in the code[2], it does this by closing the socket
and then it gets auto-reconnected. I guess that means its not possible to
disconnect without automatically reconnecting, but for now this behaviour
is sufficient for me.

Hopefully this is useful to others, as I don't see chsk-reconnect!
documented anywhere.

[1] https://github.com/ptaoussanis/sente/issues/63 and
https://github.com/ptaoussanis/sente/blob/93a8660b23c001cb50701f80f78d9a86fd4f5433/src/taoensso/sente.cljx#L555
[2]
https://github.com/ptaoussanis/sente/blob/93a8660b23c001cb50701f80f78d9a86fd4f5433/src/taoensso/sente.cljx#L632
and
https://github.com/ptaoussanis/sente/blob/93a8660b23c001cb50701f80f78d9a86fd4f5433/src/taoensso/sente.cljx#L732


On 24 August 2014 18:06, Daniel Kersten <dkers...@gmail.com> wrote:

> Hi,
>
> I'm trying programmatically close a connected sente connection (either on
> the server or the client).
>
> Is this possible?
>
> Thanks,
> Dan.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to