mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-07-25 08:45:20 +00:00
remove the noise handshake if peer goes offline (#435)
This commit is contained in:
@@ -150,6 +150,13 @@ class BluetoothMeshService(private val context: Context) {
|
||||
}
|
||||
override fun onPeerRemoved(peerID: String) {
|
||||
try { gossipSyncManager.removeAnnouncementForPeer(peerID) } catch (_: Exception) { }
|
||||
// Also drop any Noise session state for this peer when they go offline
|
||||
try {
|
||||
encryptionService.removePeer(peerID)
|
||||
Log.d(TAG, "Removed Noise session for offline peer $peerID")
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "Failed to remove Noise session for $peerID: ${e.message}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user