Mark a server as active right now. The framework calls this automatically on connect and on every successful [`call_tool`](Self::call_tool); hosts can call it explicitly to keep a server "warm" out of band (e.g. when a tool result comes back via a different channel).
(&self, name: &str)
| 187 | /// to keep a server "warm" out of band (e.g. when a tool result |
| 188 | /// comes back via a different channel). |
| 189 | pub async fn touch(&self, name: &str) { |
| 190 | self.last_used_at_ms |
| 191 | .write() |
| 192 | .await |
| 193 | .insert(name.to_string(), now_epoch_ms()); |
| 194 | } |
| 195 | |
| 196 | /// Disconnect every connected server whose last-used timestamp is |
| 197 | /// older than `now - idle_threshold_ms`. Returns the names of |
no test coverage detected