Skip to content

Commit

Permalink
Swap executor for reloader to fix dev server hanging on code changes (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
npezza93 authored Dec 6, 2024
1 parent aa2d68b commit d536c28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/action_cable/subscription_adapter/solid_cable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def channels
end

def broadcast_messages
Rails.application.reloader.wrap do
Rails.application.executor.wrap do
::SolidCable::Message.broadcastable(channels, last_id).
each do |message|
broadcast(message.channel, message.payload)
Expand Down
6 changes: 3 additions & 3 deletions test/config_stubs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ def config_for(_file)
@config
end

def reloader
@reloader ||= ReloaderStub.new
def executor
@executor ||= ExectorStub.new
end

class ReloaderStub
class ExectorStub
def wrap(&block)
block.call
end
Expand Down

0 comments on commit d536c28

Please sign in to comment.