Fix async FakeIP save

This commit is contained in:
世界
2023-07-08 16:08:46 +08:00
parent 1c526feec1
commit 9d75385bbb
5 changed files with 41 additions and 9 deletions

View File

@@ -95,12 +95,7 @@ func (s *Store) Create(domain string, strategy dns.DomainStrategy) (netip.Addr,
s.inet6Current = nextAddress
address = nextAddress
}
go func() {
err := s.storage.FakeIPStore(address, domain)
if err != nil {
s.logger.Warn("save FakeIP address pair: ", err)
}
}()
s.storage.FakeIPStoreAsync(address, domain, s.logger)
return address, nil
}