lib/tamashii/manager/client_manager.rb in tamashii-manager-0.2.5 vs lib/tamashii/manager/client_manager.rb in tamashii-manager-0.2.6
- old
+ new
@@ -27,9 +27,15 @@
end
def send_to(id, packet)
Manager.server.pubsub.send_to(id, packet)
end
+
+ def ensure_heartbeat_enabled(event_loop)
+ @heartbeat_timer = event_loop.timer(Config.heartbeat_interval) do
+ event_loop.post { accepted_clients.values.map(&:beat) }
+ end
+ end
end
end
end
# rubocop:enable Metrics/MethodLength
end