From 55a088167e1f2e10dadefadb5e2e68e2301dba14 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Thu, 5 Feb 2015 21:00:18 +0530 Subject: Add a Server#disconnect callback --- lib/action_cable/server.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/action_cable/server.rb b/lib/action_cable/server.rb index 9a30c7d3bf..e657f6d636 100644 --- a/lib/action_cable/server.rb +++ b/lib/action_cable/server.rb @@ -37,6 +37,7 @@ module ActionCable @websocket.on(:close) do |event| worker_pool.async.invoke(self, :cleanup_subscriptions) + worker_pool.async.invoke(self, :disconnect) if respond_to?(:disconnect) end @websocket.rack_response -- cgit v1.2.3