introduce rw lock for db, ish...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
parent
a1a3ff4ba8
commit
eff529f2c5
12 changed files with 369 additions and 156 deletions
|
@ -107,6 +107,7 @@ func (h *Headscale) handlePoll(
|
|||
machine.LastSeen = &now
|
||||
}
|
||||
|
||||
// TODO(kradalby): Save specific stuff, not whole object.
|
||||
if err := h.db.MachineSave(machine); err != nil {
|
||||
logErr(err, "Failed to persist/update machine in the database")
|
||||
http.Error(writer, "", http.StatusInternalServerError)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue