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

+1 -1
View File
@@ -523,7 +523,7 @@ func (h *Headscale) validateMachineForOIDCCallback(
Str("machine", machine.Hostname).
Msg("machine already registered, reauthenticating")
err := h.db.RefreshMachine(machine, expiry)
err := h.db.MachineSetExpiry(machine, expiry)
if err != nil {
util.LogErr(err, "Failed to refresh machine")
http.Error(