aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/action_cable/storage_adapter
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2016-01-14 16:00:25 +1030
committerJon Moss <me@jonathanmoss.me>2016-01-18 18:59:01 -0500
commit9631c6771061866bd89b4f632a5507c5a54603e4 (patch)
treedab687de9889bcda65442b474f6a9ecc3125c6c8 /actioncable/lib/action_cable/storage_adapter
parent05d753ff31548377dec587ed1aeef03d92ec535f (diff)
downloadrails-9631c6771061866bd89b4f632a5507c5a54603e4.tar.gz
rails-9631c6771061866bd89b4f632a5507c5a54603e4.tar.bz2
rails-9631c6771061866bd89b4f632a5507c5a54603e4.zip
Blanket unsubscribe doesn't appear to be used
Diffstat (limited to 'actioncable/lib/action_cable/storage_adapter')
-rw-r--r--actioncable/lib/action_cable/storage_adapter/postgres.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/actioncable/lib/action_cable/storage_adapter/postgres.rb b/actioncable/lib/action_cable/storage_adapter/postgres.rb
index 8b4c0ef29f..119ea787d7 100644
--- a/actioncable/lib/action_cable/storage_adapter/postgres.rb
+++ b/actioncable/lib/action_cable/storage_adapter/postgres.rb
@@ -74,13 +74,9 @@ module ActionCable
end
end
- def unsubscribe_to(channel, callback = nil)
+ def unsubscribe_to(channel, callback)
@sync.synchronize do
- if callback
- @subscribers[channel].delete(callback)
- else
- @subscribers.delete(channel)
- end
+ @subscribers[channel].delete(callback)
if @subscribers[channel].empty?
@queue.push([:unlisten, channel])