From 4ad62aaa6aa269f08c0fdc9c139e6d5417e21746 Mon Sep 17 00:00:00 2001 From: Mathias Hall-Andersen Date: Sat, 8 Jul 2017 23:51:26 +0200 Subject: Improved timer state machine --- src/keypair.go | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/keypair.go') diff --git a/src/keypair.go b/src/keypair.go index 3caa0c8..b24dbe4 100644 --- a/src/keypair.go +++ b/src/keypair.go @@ -23,19 +23,6 @@ type KeyPairs struct { next *KeyPair // not yet "confirmed by transport" } -/* Called during recieving to confirm the handshake - * was completed correctly - */ -func (kp *KeyPairs) Used(key *KeyPair) { - if key == kp.next { - kp.mutex.Lock() - kp.previous = kp.current - kp.current = key - kp.next = nil - kp.mutex.Unlock() - } -} - func (kp *KeyPairs) Current() *KeyPair { kp.mutex.RLock() defer kp.mutex.RUnlock() -- cgit v1.2.3