Atmosphere/atmosphere — Issue #54: Lifecycle policy scheduler needs to be modified based on activity
Author: azell
Created: 2011-11-04 06:32:31+00:00
State: open

The code in DefaultBroadcaster.setBroadcasterLifeCyclePolicy schedules a Runnable to execute every units, where is the policy timeout. The IDLE_RESUME code path will execute if there are active resources for the broadcaster (!resources.isEmpty()) in which case the broadcaster is destroyed.

How does the Runnable determine how long the broadcaster has been idle? Is it cancelled if any activity on the broadcaster has been detected, and re-scheduled? If not, wouldn't the IDLE_RESUME code path be executed any time there is an active connection?