Move DB call of pollmap to Machine inside a function

This commit is contained in:
Kristoffer Dalby 2021-10-02 21:58:28 +01:00
parent 42913e2c37
commit 0475eb6ef7
No known key found for this signature in database
GPG key ID: 09F62DC067465735
4 changed files with 24 additions and 8 deletions

1
api.go
View file

@ -226,6 +226,7 @@ func (h *Headscale) getMapResponse(mKey wgkey.Key, req tailcfg.MapRequest, m Mac
Msg("Cannot convert to node")
return nil, err
}
peers, err := h.getPeers(m)
if err != nil {
log.Error().