Set online status in lite requests (#1555)
This commit is contained in:
parent
84fbca97f7
commit
64c0a6523f
3 changed files with 14 additions and 15 deletions
|
@ -15,7 +15,6 @@ import (
|
|||
"time"
|
||||
|
||||
mapset "github.com/deckarep/golang-set/v2"
|
||||
"github.com/juanfont/headscale/hscontrol/db"
|
||||
"github.com/juanfont/headscale/hscontrol/policy"
|
||||
"github.com/juanfont/headscale/hscontrol/types"
|
||||
"github.com/juanfont/headscale/hscontrol/util"
|
||||
|
@ -218,9 +217,6 @@ func (m *Mapper) fullMapResponse(
|
|||
return nil, err
|
||||
}
|
||||
|
||||
// TODO(kradalby): Move this into appendPeerChanges?
|
||||
resp.OnlineChange = db.OnlineNodeMap(peers)
|
||||
|
||||
err = appendPeerChanges(
|
||||
resp,
|
||||
pol,
|
||||
|
@ -618,5 +614,8 @@ func appendPeerChanges(
|
|||
resp.UserProfiles = profiles
|
||||
resp.SSHPolicy = sshPolicy
|
||||
|
||||
// TODO(kradalby): This currently does not take last seen in keepalives into account
|
||||
resp.OnlineChange = peers.OnlineNodeMap()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue