Refine panic mode to regenerate identities immediately (#624)

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
This commit is contained in:
jack
2025-09-15 21:39:39 +02:00
committed by GitHub
co-authored by jack
parent f684c452b2
commit 00ff5fd31c
9 changed files with 136 additions and 39 deletions
@@ -526,6 +526,15 @@ final class NoiseEncryptionService {
SecureLogger.info(.sessionExpired(peerID: peerID))
}
func clearEphemeralStateForPanic() {
sessionManager.removeAllSessions()
serviceQueue.sync(flags: .barrier) {
peerFingerprints.removeAll()
fingerprintToPeerID.removeAll()
}
rateLimiter.resetAll()
}
// MARK: - Private Helpers