diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2019-02-13 00:44:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-13 00:44:02 +0100 |
commit | bc2954d02b7bae0c1ae3a9a647d5cf6699c25b51 (patch) | |
tree | acd23f3be831673cb04a49ef847aff6876c47c57 /actioncable/lib/action_cable | |
parent | 7432e251873690234d0d288e8eb009fbee80b635 (diff) | |
parent | 3cd69fa2c025da1cc45b1b9b43b227cceb025837 (diff) | |
download | rails-bc2954d02b7bae0c1ae3a9a647d5cf6699c25b51.tar.gz rails-bc2954d02b7bae0c1ae3a9a647d5cf6699c25b51.tar.bz2 rails-bc2954d02b7bae0c1ae3a9a647d5cf6699c25b51.zip |
Merge pull request #34714 from palkan/chore/refactor-action-cable-server-config
Action Cable: allow multiple instances of Server::Base with different configs
Diffstat (limited to 'actioncable/lib/action_cable')
-rw-r--r-- | actioncable/lib/action_cable/server/base.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/actioncable/lib/action_cable/server/base.rb b/actioncable/lib/action_cable/server/base.rb index 2b9e1cba3b..98b3743175 100644 --- a/actioncable/lib/action_cable/server/base.rb +++ b/actioncable/lib/action_cable/server/base.rb @@ -12,14 +12,17 @@ module ActionCable include ActionCable::Server::Broadcasting include ActionCable::Server::Connections - cattr_accessor :config, instance_accessor: true, default: ActionCable::Server::Configuration.new + cattr_accessor :config, instance_accessor: false, default: ActionCable::Server::Configuration.new + + attr_reader :config def self.logger; config.logger; end delegate :logger, to: :config attr_reader :mutex - def initialize + def initialize(config: self.class.config) + @config = config @mutex = Monitor.new @remote_connections = @event_loop = @worker_pool = @pubsub = nil end |