go-dnsclient.patch 372 B

12345678910111213141516171819
  1. 296a297,300
  2. > conf.update(name)
  3. > }
  4. >
  5. > func (conf *resolverConfig) update(name string) {
  6. 300a305,316
  7. > }
  8. >
  9. > func UpdateDnsConf() {
  10. > resolvConf.initOnce.Do(resolvConf.init)
  11. >
  12. > // Ensure only one update at a time checks resolv.conf.
  13. > if !resolvConf.tryAcquireSema() {
  14. > return
  15. > }
  16. > defer resolvConf.releaseSema()
  17. >
  18. > resolvConf.update("/etc/resolv.conf")