tinco / nobrainer_streams

A temporary gem that implements streams in NoBrainer, hopefully it gets merged soon and this gem will be obsolete.
MIT License
8 stars 4 forks source link

When one client disconnects, everyone stops receiving data #2

Closed macteo closed 7 years ago

macteo commented 7 years ago

First of all thanks for this awesome contribute.

I'm having a similar issue (same effect different cause) as #1.

When trying to stream changes for a single record using stream_from current_user.messages.where(id: identifier) I'm not able to receive data and on the console I receive the Closing cursor: #<NoBrainer::Streams::ConcurrentAsyncHandler::AsyncQueryHandler[...] message.

I'm wondering if you can tell me the meaning of rows 7:9 of the main _nobrainerstreams.rb file

included do
    on_unsubscribe :stop_all_streams
end

If I comment the on_unsubscribe :stop_all_streams line everything seems to work perfectly, but I'm wondering if there will be leaks of some sort.

Any thoughts?

Thanks in advance.

macteo commented 7 years ago

Nevermind, it doesn't work anyway.