diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-06-26 22:07:29 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-06-26 22:07:29 +0200 |
commit | eb75ff430d1f78e129bbfe49d612f241ca418df4 (patch) | |
tree | ca9a786c1df51c1404001555b1c1c9d425d0b614 /src/peer.go | |
parent | 9d806d3853c926df75e83966d2c4f832708a1b08 (diff) |
Begin implementation of outbound work queue
Diffstat (limited to 'src/peer.go')
-rw-r--r-- | src/peer.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/peer.go b/src/peer.go index 42b9e8d..6a879cb 100644 --- a/src/peer.go +++ b/src/peer.go @@ -14,8 +14,7 @@ const ( type Peer struct { mutex sync.RWMutex - endpointIP net.IP // - endpointPort uint16 // + endpoint *net.UDPAddr persistentKeepaliveInterval time.Duration // 0 = disabled keyPairs KeyPairs handshake Handshake @@ -35,6 +34,7 @@ func (device *Device) NewPeer(pk NoisePublicKey) *Peer { peer.mutex.Lock() peer.device = device + peer.keyPairs.Init() peer.queueOutbound = make(chan *OutboundWorkQueueElement, OutboundQueueSize) // map public key |