Skip to content

Commit

Permalink
feat: add cleanup logic
Browse files Browse the repository at this point in the history
  • Loading branch information
vyfor committed Dec 6, 2024
1 parent aa09011 commit df96059
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/cord.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ impl Cord {
}
}

self.cleanup();
Ok(())
}

Expand All @@ -93,4 +94,12 @@ impl Cord {

Ok(())
}

fn cleanup(&mut self) {
if let Some(client) = Arc::get_mut(&mut self.rich_client) {
client.close();
}

self.pipe.stop();
}
}

0 comments on commit df96059

Please sign in to comment.