syncv3: reset the connection after restarts

This commit is contained in:
morguldir 2024-08-24 06:57:31 +02:00
parent 13334a88ca
commit 85400d15bc
No known key found for this signature in database
GPG key ID: 5A6025D4F6E7A8A3
2 changed files with 23 additions and 2 deletions

View file

@ -68,6 +68,13 @@ impl Service {
#[inline]
pub fn exists(&self, user_id: &UserId) -> Result<bool> { self.db.exists(user_id) }
pub fn remembered(&self, user_id: OwnedUserId, device_id: OwnedDeviceId, conn_id: String) -> bool {
self.connections
.lock()
.unwrap()
.contains_key(&(user_id, device_id, conn_id))
}
pub fn forget_sync_request_connection(&self, user_id: OwnedUserId, device_id: OwnedDeviceId, conn_id: String) {
self.connections
.lock()