aboutsummaryrefslogtreecommitdiffstats
path: root/lib/action_cable/server/base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/action_cable/server/base.rb')
-rw-r--r--lib/action_cable/server/base.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/action_cable/server/base.rb b/lib/action_cable/server/base.rb
index 23cd8388bd..8d64afa1d9 100644
--- a/lib/action_cable/server/base.rb
+++ b/lib/action_cable/server/base.rb
@@ -21,6 +21,11 @@ module ActionCable
config.connection_class.new(self, env).process
end
+ # Disconnect all the remote connections established for subject, finded by identifiers
+ def disconnect(identifiers)
+ remote_connections.where(identifiers).disconnect
+ end
+
# Gateway to RemoteConnections. See that class for details.
def remote_connections
@remote_connections ||= RemoteConnections.new(self)