]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
send: use accessor function for buffer pool
authorJason A. Donenfeld <Jason@zx2c4.com>
Sun, 16 Sep 2018 15:30:46 +0000 (17:30 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Sun, 16 Sep 2018 16:49:19 +0000 (18:49 +0200)
send.go

diff --git a/send.go b/send.go
index 731c50a394c4f2eb8189781be2f79f87737c8e5a..37ae7384b2d957b5896b6ec89041c701e0cc6fc0 100644 (file)
--- a/send.go
+++ b/send.go
@@ -54,7 +54,7 @@ type QueueOutboundElement struct {
 func (device *Device) NewOutboundElement() *QueueOutboundElement {
        return &QueueOutboundElement{
                dropped: AtomicFalse,
-               buffer:  device.pool.messageBuffers.Get().(*[MaxMessageSize]byte),
+               buffer:  device.GetMessageBuffer(),
        }
 }