aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable
diff options
context:
space:
mode:
Diffstat (limited to 'actioncable')
-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])