(&mut self)
| 44 | |
| 45 | impl InspectorHubState { |
| 46 | fn prune_stale_polled_agents(&mut self) { |
| 47 | let now = Instant::now(); |
| 48 | self.agents.retain(|_, agent| { |
| 49 | !agent.info.is_null() || now.duration_since(agent.created_at) < POLLED_AGENT_TTL |
| 50 | }); |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | #[derive(Clone)] |