device: remove unnecessary zeroing in peer.SendKeepalive

elem.packet is always already nil.

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
Josh Bleecher Snyder 2021-02-08 09:21:31 -08:00
parent 9c75f58f3d
commit da95677203

View File

@ -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)