aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/action_cable/server/base.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/action_cable/server/base.rb b/lib/action_cable/server/base.rb
index 23cd8388bd..fe7966e090 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 connections identified by `identifiers` on this server or any others via RemoteConnections.
+ 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)
@@ -61,4 +66,4 @@ module ActionCable
end
end
end
-end \ No newline at end of file
+end