diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-07-14 14:25:18 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-07-14 14:25:18 +0200 |
commit | 8993b3927cf66517e2884b181d6b71d4c6599b7a (patch) | |
tree | a19a98791a7b4e800ad5cf815a7e008d317949f9 /src/timers.go | |
parent | 0043008ad06bbeda4b037f2959f2c9cf1b55d65b (diff) |
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.go | 2 |
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) |