Rework index hashtable

This commit is contained in:
Jason A. Donenfeld
2018-05-13 18:23:40 +02:00
parent 233f079a94
commit 2c27ab205c
8 changed files with 78 additions and 88 deletions

View File

@ -108,7 +108,7 @@ func expiredZeroKeyMaterial(peer *Peer) {
hs := &peer.handshake
hs.mutex.Lock()
kp := &peer.keyPairs
kp := &peer.keypairs
kp.mutex.Lock()
if kp.previous != nil {
@ -125,7 +125,7 @@ func expiredZeroKeyMaterial(peer *Peer) {
}
kp.mutex.Unlock()
peer.device.indices.Delete(hs.localIndex)
peer.device.indexTable.Delete(hs.localIndex)
hs.Clear()
hs.mutex.Unlock()
}