From 48ef6e5a6f492d80aae8e7467498b4053f11da58 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Thu, 19 Aug 2021 18:06:57 +0100 Subject: [PATCH] Rename keepAlive function, as it now does more things --- poll.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/poll.go b/poll.go index 27358fc5..522c529e 100644 --- a/poll.go +++ b/poll.go @@ -218,7 +218,7 @@ func (h *Headscale) PollNetMapStream( updateChan chan struct{}, cancelKeepAlive chan struct{}, ) { - go h.keepAlive(cancelKeepAlive, keepAliveChan, mKey, req, m) + go h.scheduledPollWorker(cancelKeepAlive, keepAliveChan, mKey, req, m) c.Stream(func(w io.Writer) bool { log.Trace(). @@ -376,8 +376,7 @@ func (h *Headscale) PollNetMapStream( }) } -// TODO: Rename this function to schedule ... -func (h *Headscale) keepAlive( +func (h *Headscale) scheduledPollWorker( cancelChan <-chan struct{}, keepAliveChan chan<- []byte, mKey wgkey.Key,