aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/action_cable/server
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2016-01-20 15:54:20 +1030
committerMatthew Draper <matthew@trebex.net>2016-01-24 22:51:06 +1030
commit68a9060d02b1eb35c12843c0f1653809b776b35b (patch)
treecde309fbbd468e972a1e01df4f50c1d2bbe119b4 /actioncable/lib/action_cable/server
parentdcdadd5e82eed2e64d21399599b14501c3e16cc3 (diff)
downloadrails-68a9060d02b1eb35c12843c0f1653809b776b35b.tar.gz
rails-68a9060d02b1eb35c12843c0f1653809b776b35b.tar.bz2
rails-68a9060d02b1eb35c12843c0f1653809b776b35b.zip
Using a hacked faye-websocket, drop EventMachine
Diffstat (limited to 'actioncable/lib/action_cable/server')
-rw-r--r--actioncable/lib/action_cable/server/connections.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/actioncable/lib/action_cable/server/connections.rb b/actioncable/lib/action_cable/server/connections.rb
index 47dcea8c20..8671dd5ebd 100644
--- a/actioncable/lib/action_cable/server/connections.rb
+++ b/actioncable/lib/action_cable/server/connections.rb
@@ -22,11 +22,9 @@ module ActionCable
# then can't rely on being able to receive and send to it. So there's a 3 second heartbeat running on all connections. If the beat fails, we automatically
# disconnect.
def setup_heartbeat_timer
- EM.next_tick do
- @heartbeat_timer ||= EventMachine.add_periodic_timer(BEAT_INTERVAL) do
- EM.next_tick { connections.map(&:beat) }
- end
- end
+ @heartbeat_timer ||= Concurrent::TimerTask.new(execution_interval: BEAT_INTERVAL) do
+ Concurrent.global_io_executor.post { connections.map(&:beat) }
+ end.tap(&:execute)
end
def open_connections_statistics