1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Blanket unsubscribe doesn't appear to be used

This commit is contained in:
Matthew Draper 2016-01-14 16:00:25 +10:30 committed by Jon Moss
parent 05d753ff31
commit 9631c67710

View file

@ -74,13 +74,9 @@ module ActionCable
end end
end end
def unsubscribe_to(channel, callback = nil) def unsubscribe_to(channel, callback)
@sync.synchronize do @sync.synchronize do
if callback @subscribers[channel].delete(callback)
@subscribers[channel].delete(callback)
else
@subscribers.delete(channel)
end
if @subscribers[channel].empty? if @subscribers[channel].empty?
@queue.push([:unlisten, channel]) @queue.push([:unlisten, channel])