From 2c27ab205c992d3387574aa6d57780744d35d36f Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 13 May 2018 18:23:40 +0200 Subject: Rework index hashtable --- peer.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'peer.go') diff --git a/peer.go b/peer.go index 242729e..f49f806 100644 --- a/peer.go +++ b/peer.go @@ -20,7 +20,7 @@ const ( type Peer struct { isRunning AtomicBool mutex sync.RWMutex - keyPairs Keypairs + keypairs Keypairs handshake Handshake device *Device endpoint Endpoint @@ -234,7 +234,7 @@ func (peer *Peer) Stop() { // clear key pairs - kp := &peer.keyPairs + kp := &peer.keypairs kp.mutex.Lock() device.DeleteKeypair(kp.previous) @@ -250,7 +250,7 @@ func (peer *Peer) Stop() { hs := &peer.handshake hs.mutex.Lock() - device.indices.Delete(hs.localIndex) + device.indexTable.Delete(hs.localIndex) hs.Clear() hs.mutex.Unlock() -- cgit v1.2.3-59-g8ed1b