wandenberg / nginx-push-stream-module

A pure stream http push technology for your Nginx setup. Comet made easy and really scalable.
Other
2.22k stars 295 forks source link

Must I use "connect" when channel is removed? #241

Closed DaaGER closed 7 years ago

DaaGER commented 8 years ago

I want know when channel "add" or "remove" I must use "connect" everytime? Thanks.

wandenberg commented 8 years ago

@DaaGER I assumed that you are talking about the methods addChannel e removeChannel from pushstream.js file. If so, checking on the code you can see that if you are already connected and add a new channel, the connection will be closed and opened again. But, on remove is at your control to call the disconnect and connect to reflect immediately. My suggestion is make all addChannel calls and them execute the first connection call. If you need to add more channels you only has to call addChannel