summaryrefslogtreecommitdiffhomepage
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
parent9c75f58f3d8656e9e5394959a67b630f51f9dc98 (diff)
device: remove unnecessary zeroing in peer.SendKeepalive
elem.packet is always already nil. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
-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)