Method: ActionCable::SubscriptionAdapter::SubscriberMap#remove_subscriber

Defined in:
actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb

#remove_subscriber(channel, subscriber) ⇒ Object



25
26
27
28
29
30
31
32
33
34
# File 'actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb', line 25

def remove_subscriber(channel, subscriber)
  @sync.synchronize do
    @subscribers[channel].delete(subscriber)

    if @subscribers[channel].empty?
      @subscribers.delete channel
      remove_channel channel
    end
  end
end