Cleans up all bookkeeping state for the specified client.
(&mut self, client: Token)
| 505 | |
| 506 | /// Cleans up all bookkeeping state for the specified client. |
| 507 | pub fn disconnect_client(&mut self, client: Token) -> Result<(), Error> { |
| 508 | let names: Vec<String> = self.interests.keys().cloned().collect(); |
| 509 | |
| 510 | for query_name in names.iter() { |
| 511 | self.uninterest(client, query_name)? |
| 512 | } |
| 513 | |
| 514 | Ok(()) |
| 515 | } |
| 516 | |
| 517 | /// Returns true iff the probe is behind any input handle. Mostly |
| 518 | /// used as a convenience method during testing. Using this within |