Skip to content

Commit

Permalink
Rename keepAlive function, as it now does more things
Browse files Browse the repository at this point in the history
  • Loading branch information
kradalby committed Aug 19, 2021
1 parent 8d1adaa commit 48ef6e5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions poll.go
Original file line number Diff line number Diff line change
Expand Up @@ -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().
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 48ef6e5

Please sign in to comment.