aboutsummaryrefslogtreecommitdiffstats
path: root/device
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josh@tailscale.com>2021-02-08 09:21:31 -0800
committerJosh Bleecher Snyder <josh@tailscale.com>2021-02-08 10:14:17 -0800
commitda956772030b8b1fcbd37f82f08863070c93aa0f (patch)
tree888789475a9cbd846c72b55deebf8253a6035abb /device
parentdevice: remove device.state.stopping from RoutineHandshake (diff)
downloadwireguard-go-da956772030b8b1fcbd37f82f08863070c93aa0f.tar.xz
wireguard-go-da956772030b8b1fcbd37f82f08863070c93aa0f.zip
device: remove unnecessary zeroing in peer.SendKeepalive
elem.packet is always already nil. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
Diffstat (limited to 'device')
-rw-r--r--device/send.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/device/send.go b/device/send.go
index 8def4ce..b9bcb33 100644
--- a/device/send.go
+++ b/device/send.go
@@ -76,7 +76,6 @@ func (elem *QueueOutboundElement) clearPointers() {
func (peer *Peer) SendKeepalive() {
if len(peer.queue.staged) == 0 && peer.isRunning.Get() {
elem := peer.device.NewOutboundElement()
- elem.packet = nil
select {
case peer.queue.staged <- elem:
peer.device.log.Verbosef("%v - Sending keepalive packet", peer)