diff --git a/lib/action_cable/subscription_adapter/solid_cable.rb b/lib/action_cable/subscription_adapter/solid_cable.rb index 65944aa..d63e29c 100644 --- a/lib/action_cable/subscription_adapter/solid_cable.rb +++ b/lib/action_cable/subscription_adapter/solid_cable.rb @@ -45,7 +45,7 @@ def initialize(event_loop) @thread = Thread.new do Thread.current.abort_on_exception = true - listen + Rails.application.executor.wrap { listen } end end @@ -96,12 +96,10 @@ def channels end def broadcast_messages - Rails.application.executor.wrap do - ::SolidCable::Message.broadcastable(channels, last_id). - each do |message| - broadcast(message.channel, message.payload) - self.last_id = message.id - end + ::SolidCable::Message.broadcastable(channels, last_id). + each do |message| + broadcast(message.channel, message.payload) + self.last_id = message.id end end