diff --git a/actioncable/lib/action_cable/storage_adapter/postgres.rb b/actioncable/lib/action_cable/storage_adapter/postgres.rb index 07c2c7ce6a..8b4c0ef29f 100644 --- a/actioncable/lib/action_cable/storage_adapter/postgres.rb +++ b/actioncable/lib/action_cable/storage_adapter/postgres.rb @@ -57,7 +57,7 @@ module ActionCable pg_conn.wait_for_notify(1) do |chan, pid, message| @subscribers[chan].each do |callback| - callback.call(message) + ::EM.next_tick { callback.call(message) } end end end