introduce rw lock for db, ish...

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
Kristoffer Dalby authored and Kristoffer Dalby committed 2023-09-19 10:20:21 -05:00
1 parent a1a3ff4ba8
commit eff529f2c5
12 files changed
+369 -156

No files matched your search

+2
View File
@@ -40,6 +40,8 @@ type HSDatabase struct {
db *gorm.DB
notifier *notifier.Notifier
mu sync.RWMutex
ipAllocationMutex sync.Mutex
ipPrefixes []netip.Prefix