Fork me on GitHub
Ben Halton13:10:28

hi there, I'm trying to do a fairly basic demo of some SSE with pedestal. I think I'm missing something obvious. I've tried the demo here: and it "works" in that I see the events in the client. But in order to make that happen I need to close the event-chan which doesn't really make sense to me? I was hoping to keep the event-chan as a long running pipe for events which would get picked up on the client.

Ben Halton13:10:54

I need a way to "flush" the channel to the client without closing the chan

Ben Halton13:10:04

or maybe I'm doing something dim on the client to cause that ?

Ben Halton13:10:58

well I've spent some time looking at the client side and I don't think it's that


Are you running this demo: You are indeed supposed to be able to keep the event-channel open for as long as you need it. When using SSE a separate dispatch loop starts piping from the event-channel to the client, so something strange is going on if you need to close the event-channel for this to happen.