mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-10 09:02:30 +08:00
Check that peers are registered when fetching them
Fix from https://github.com/awsong/headscale
This commit is contained in:
parent
b0b9e3a9af
commit
acb645aa9d
1 changed files with 1 additions and 1 deletions
|
@ -107,7 +107,7 @@ func (h *Headscale) getPeers(m Machine) (*[]*tailcfg.Node, error) {
|
|||
|
||||
// Add user management here?
|
||||
machines := []Machine{}
|
||||
if err = db.Where("machine_key <> ?", m.MachineKey).Find(&machines).Error; err != nil {
|
||||
if err = db.Where("machine_key <> ? AND registered", m.MachineKey).Find(&machines).Error; err != nil {
|
||||
log.Printf("Error accessing db: %s", err)
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue