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:
parent
05d753ff31
commit
9631c67710
1 changed files with 2 additions and 6 deletions
|
@ -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])
|
||||||
|
|
Loading…
Reference in a new issue