Skip to content

Commit d99040a

Browse files
committed
preloading after file change
1 parent 81c85a3 commit d99040a

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

hosts.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"test1.store:9091": ["localhost:8002"]
2+
"test1.store": ["localhost:8002"]
33
}

init.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ func init() {
3030
}
3131

3232
hosts.Store(resultedHosts)
33+
34+
preloadCerts()
3335
})
3436
}
3537

preloader.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ func preloadCerts() {
1515
resp, err := http.Get("http://" + h)
1616
if err != nil {
1717
log.Println(err.Error())
18+
return
1819
}
1920
defer resp.Body.Close()
2021
log.Printf("=> preloading certs result for %s -> %s\n", h, resp.Status)

0 commit comments

Comments
 (0)