Return simple responses immediatly

This commit rearranges the poll handler to immediatly accept
updates and notify its peers and return, not travel down the
function for a bit. This reduces the DB calls and other
holdups that isnt necessary to send a "lite response", a
map response without peers, or accepting an endpoint update.

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
Kristoffer Dalby 2023-09-11 06:18:31 -05:00 committed by Kristoffer Dalby
parent 217ccd6540
commit c957f893bd
3 changed files with 221 additions and 137 deletions

View file

@ -94,8 +94,6 @@ type Headscale struct {
shutdownChan chan struct{}
pollNetMapStreamWG sync.WaitGroup
pollStreamOpenMu sync.Mutex
}
func NewHeadscale(cfg *types.Config) (*Headscale, error) {