Log & test connections

This commit is contained in:
asonix
2021-02-10 00:57:49 -06:00
parent b2904bb1ba
commit d0a728a9b5
2 changed files with 31 additions and 1 deletions
+2
View File
@@ -57,11 +57,13 @@ impl ActorCache {
}
pub(crate) async fn add_connection(&self, actor: Actor) -> Result<(), MyError> {
log::debug!("Adding connection: {}", actor.id);
self.db.add_connection(actor.id.clone()).await?;
self.db.save_actor(actor).await
}
pub(crate) async fn remove_connection(&self, actor: &Actor) -> Result<(), MyError> {
log::debug!("Removing connection: {}", actor.id);
self.db.remove_connection(actor.id.clone()).await
}