Skip to content

Commit

Permalink
Connections Map changed to Each in ping task
Browse files Browse the repository at this point in the history
No need to make new array containing all connections because returned value of map is not used
  • Loading branch information
malis committed Jun 16, 2022
1 parent 33e3710 commit cef3342
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actioncable/lib/action_cable/server/connections.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def remove_connection(connection)
# disconnect.
def setup_heartbeat_timer
@heartbeat_timer ||= event_loop.timer(BEAT_INTERVAL) do
event_loop.post { connections.map(&:beat) }
event_loop.post { connections.each(&:beat) }
end
end

Expand Down

0 comments on commit cef3342

Please sign in to comment.