The correct protocol state is good to update, absolutely.

From a code perspective, it's important to maintain that state in a single
place - i.e. the state that the Session object is in, rather than half
there and have boolean instance vars.


On Fri, Dec 6, 2013 at 11:45 AM, Kacper Kawecki <notifications@github.com>wrote:

> In lib/sockjs/session.rb:
>
> > @@ -55,7 +60,9 @@ def on_enter
> >
> >        def attach_consumer(response, transport)
> >          @consumer = Consumer.new(response, transport)
> > +        activate
>
> after_consumer_attached, after_consumer_detached I think are not
> necessary. I added activated and suspended , because websocket are not
> closed until they receive close frame. So session go to suspend state (idle
> state) when there is no connection with client, but it is still alive.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/nyarly/sockjs-ruby/pull/7/files#r8171429>
> .
>