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:
parent
217ccd6540
commit
c957f893bd
3 changed files with 221 additions and 137 deletions
|
@ -94,8 +94,6 @@ type Headscale struct {
|
|||
|
||||
shutdownChan chan struct{}
|
||||
pollNetMapStreamWG sync.WaitGroup
|
||||
|
||||
pollStreamOpenMu sync.Mutex
|
||||
}
|
||||
|
||||
func NewHeadscale(cfg *types.Config) (*Headscale, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue