add: trigger regen on drop

This commit is contained in:
Charles
2025-10-18 01:17:49 -07:00
parent 1dfdff35c3
commit b51be8957d
3 changed files with 10 additions and 5 deletions

View File

@@ -36,9 +36,12 @@ impl Server {
}
}
pub fn cleanup(&mut self) -> Result<()> {
self.rewriter.cleanup();
Ok(())
pub fn cleanup(&mut self) -> Result<bool> {
let cleaned_up = self.rewriter.cleanup();
if cleaned_up {
self.generate_config()?;
}
Ok(cleaned_up)
}
pub fn register(&mut self, _request: &Request, ip: &str) -> Result<()> {