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:
parent
9c75f58f3d
commit
da95677203
|
@ -76,7 +76,6 @@ func (elem *QueueOutboundElement) clearPointers() {
|
||||||
func (peer *Peer) SendKeepalive() {
|
func (peer *Peer) SendKeepalive() {
|
||||||
if len(peer.queue.staged) == 0 && peer.isRunning.Get() {
|
if len(peer.queue.staged) == 0 && peer.isRunning.Get() {
|
||||||
elem := peer.device.NewOutboundElement()
|
elem := peer.device.NewOutboundElement()
|
||||||
elem.packet = nil
|
|
||||||
select {
|
select {
|
||||||
case peer.queue.staged <- elem:
|
case peer.queue.staged <- elem:
|
||||||
peer.device.log.Verbosef("%v - Sending keepalive packet", peer)
|
peer.device.log.Verbosef("%v - Sending keepalive packet", peer)
|
||||||
|
|
Loading…
Reference in a new issue