PollNetMapStream: do not create any rows during long-poll operation

This commit is contained in:
Csaba Sarkadi 2022-01-16 11:59:03 +01:00
parent 4d60aeae18
commit 25ccf5ef18
2 changed files with 75 additions and 17 deletions

View file

@ -319,6 +319,14 @@ func (h *Headscale) DeleteMachine(machine *Machine) error {
return h.RequestMapUpdates(namespaceID)
}
func (h *Headscale) TouchMachine(machine *Machine) error {
return h.db.Updates(Machine{
ID: machine.ID,
LastSeen: machine.LastSeen,
LastSuccessfulUpdate: machine.LastSuccessfulUpdate,
}).Error
}
// HardDeleteMachine hard deletes a Machine from the database.
func (h *Headscale) HardDeleteMachine(machine *Machine) error {
err := h.RemoveSharedMachineFromAllNamespaces(machine)