net: do not call time.Now() twice

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/104080043
This commit is contained in:
Rui Ueyama 2014-06-11 20:33:44 -07:00
parent d131ffefad
commit f837078c50
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ func readHosts() {
}
}
// Update the data cache.
hosts.expire = time.Now().Add(cacheMaxAge)
hosts.expire = now.Add(cacheMaxAge)
hosts.path = hp
hosts.byName = hs
hosts.byAddr = is