aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Hardy <packagethief@gmail.com>2015-07-08 22:45:58 -0400
committerJeffrey Hardy <packagethief@gmail.com>2015-07-08 23:11:21 -0400
commit6c0afaf967b2897a6f998da70814cd694a7fe1f1 (patch)
treefa5c301e8d2595b9396029a584ecb9d98263415e
parent5ad75fb4596416d36b513373c3745d10c3acee15 (diff)
downloadrails-6c0afaf967b2897a6f998da70814cd694a7fe1f1.tar.gz
rails-6c0afaf967b2897a6f998da70814cd694a7fe1f1.tar.bz2
rails-6c0afaf967b2897a6f998da70814cd694a7fe1f1.zip
ActionCable.server should always return the same instance
-rw-r--r--lib/action_cable.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/action_cable.rb b/lib/action_cable.rb
index 5f1f3bec35..fac83cb4c3 100644
--- a/lib/action_cable.rb
+++ b/lib/action_cable.rb
@@ -28,6 +28,6 @@ module ActionCable
# Singleton instance of the server
module_function def server
- ActionCable::Server::Base.new
+ @server ||= ActionCable::Server::Base.new
end
end