This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-11
Channels
- # beginners (132)
- # boot (2)
- # cider (17)
- # cljs-dev (6)
- # cljsrn (24)
- # clojure (134)
- # clojure-austin (2)
- # clojure-dusseldorf (11)
- # clojure-france (1)
- # clojure-greece (27)
- # clojure-italy (17)
- # clojure-madison (1)
- # clojure-russia (31)
- # clojure-serbia (1)
- # clojure-sg (2)
- # clojure-spec (30)
- # clojure-uk (66)
- # clojurescript (73)
- # core-async (2)
- # cursive (8)
- # data-science (2)
- # datomic (23)
- # dirac (8)
- # emacs (18)
- # gsoc (1)
- # hoplon (36)
- # immutant (26)
- # leiningen (6)
- # off-topic (21)
- # om (19)
- # onyx (6)
- # other-languages (1)
- # pedestal (3)
- # proton (2)
- # random (1)
- # re-frame (1)
- # reagent (2)
- # remote-jobs (2)
- # ring-swagger (8)
- # rum (21)
- # slack-help (1)
- # spacemacs (4)
- # specter (16)
- # untangled (6)
when I try to connect to a secure websocket, wss://...
I get a response header Sec-Websocket-Location: ws://...
any ideas why that might be?
this is immutant running on heroku
immutant 2.1.6
my websocket works fine when I run the server locally, using ws://
but when I deploy and try to access the secure wss://
, I get a 1006 code from my JS client
I think the issue might have been unrelated to websockets and immutant all together. I was banging my head against the wall all day yesterday, unable to get my client to successfully connect to the websocket. I thought it was an issue with not being able to properly connect to a secure wss websocket on Heroku. Then I discovered EventSource
and decided to give that a try instead; since I’m really just using the channel for server-side events and nothing from the client is being sent to the server. I was getting an error, but this time an exception was being thrown on the server. Turns out, I forgot to set an environment variable on Heroku to connect to my redis instance. Once I did that, EventSource
was working as expected. I suspect the connection exception was being swallowed and not showing up in my logs when using the websocket implementation.
@bostonaholic glad to hear you solved it
it was a moment
is there not an :on-close
callback for Server-Side Events?
@bostonaholic: sse/as-channel
is just an extension of async/as-channel
, so should support :on-close
. Do you have one, and it's just not getting called?
it must not have been, or I might have not properly reloaded
It's possible there is a bug there as well - none of our sse tests have an :on-close
I’ve gone back to using a websocket for the time being, since I know that was working
I might take a look at using sse again after a while
thanks!
oh no
hmm, if I close the channel from the server side, :on-close
does get called. If I close from the client side and try to send!
, that should trigger :on-close
as well, I think, but doesn't appear to be
great, thanks!
we've got a release almost ready (maybe sometime next week?), I'll take a look at this before then
:thumbsup: