Commit f837078c authored by Rui Ueyama's avatar Rui Ueyama

net: do not call time.Now() twice

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/104080043
parent d131ffef
...@@ -51,7 +51,7 @@ func readHosts() { ...@@ -51,7 +51,7 @@ func readHosts() {
} }
} }
// Update the data cache. // Update the data cache.
hosts.expire = time.Now().Add(cacheMaxAge) hosts.expire = now.Add(cacheMaxAge)
hosts.path = hp hosts.path = hp
hosts.byName = hs hosts.byName = hs
hosts.byAddr = is hosts.byAddr = is
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment