Fix relay (#827)

Co-authored-by: Nate Brown <nbrown.us@gmail.com>
This commit is contained in:
brad-defined 2023-03-30 12:09:20 -04:00 committed by GitHub
parent e28336c5db
commit 2801fb2286
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 282 additions and 109 deletions

View file

@ -198,7 +198,7 @@ func (c *Control) CloseAllTunnels(excludeLighthouses bool) (closed int) {
hostInfos := []*HostInfo{}
// Grab the hostMap lock to access the Hosts map
c.f.hostMap.Lock()
for _, relayHost := range c.f.hostMap.Hosts {
for _, relayHost := range c.f.hostMap.Indexes {
if _, ok := relayingHosts[relayHost.vpnIp]; !ok {
hostInfos = append(hostInfos, relayHost)
}