oidc: make email verification configurable
Some checks failed
Build / build-nix (push) Has been cancelled
Build / build-cross (GOARCH=amd64 GOOS=darwin) (push) Has been cancelled
Build / build-cross (GOARCH=amd64 GOOS=linux) (push) Has been cancelled
Build / build-cross (GOARCH=arm64 GOOS=darwin) (push) Has been cancelled
Build / build-cross (GOARCH=arm64 GOOS=linux) (push) Has been cancelled
Check Generated Files / check-generated (push) Has been cancelled
NixOS Module Tests / nix-module-check (push) Has been cancelled
Tests / test (push) Has been cancelled

Co-authored-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
Justin Angel 2025-12-18 06:42:32 -05:00 committed by GitHub
parent e8753619de
commit 7be20912f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 292 additions and 46 deletions

View file

@ -31,6 +31,7 @@ type LockFreeBatcher struct {
workCh chan work
workChOnce sync.Once // Ensures workCh is only closed once
done chan struct{}
doneOnce sync.Once // Ensures done is only closed once
// Batching state
pendingChanges *xsync.Map[types.NodeID, []change.Change]
@ -151,10 +152,12 @@ func (b *LockFreeBatcher) Start() {
}
func (b *LockFreeBatcher) Close() {
// Signal shutdown to all goroutines
if b.done != nil {
close(b.done)
}
// Signal shutdown to all goroutines, only once
b.doneOnce.Do(func() {
if b.done != nil {
close(b.done)
}
})
// Only close workCh once using sync.Once to prevent races
b.workChOnce.Do(func() {