aboutsummaryrefslogtreecommitdiffstats
path: root/src/timers.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-07-14 14:25:18 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-07-14 14:25:18 +0200
commit8993b3927cf66517e2884b181d6b71d4c6599b7a (patch)
treea19a98791a7b4e800ad5cf815a7e008d317949f9 /src/timers.go
parentEndpoint discovery from handshake initiation (diff)
downloadwireguard-go-8993b3927cf66517e2884b181d6b71d4c6599b7a.tar.xz
wireguard-go-8993b3927cf66517e2884b181d6b71d4c6599b7a.zip
Improved throughput
- Improved performance by adding the message buffers to a sync.Pool. - Fixed issue with computing "next" key-pair upon receiving a response message.
Diffstat (limited to 'src/timers.go')
-rw-r--r--src/timers.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/timers.go b/src/timers.go
index 2e5046e..9140e41 100644
--- a/src/timers.go
+++ b/src/timers.go
@@ -128,7 +128,7 @@ func (peer *Peer) BeginHandshakeInitiation() (*QueueOutboundElement, error) {
// marshal & schedule for sending
- writer := bytes.NewBuffer(elem.data[:0])
+ writer := bytes.NewBuffer(elem.buffer[:0])
binary.Write(writer, binary.LittleEndian, msg)
elem.packet = writer.Bytes()
peer.mac.AddMacs(elem.packet)