Fixes 2537: status now prints 'failed to check latest version' when the checkpoint API is not available (+test).

This commit is contained in:
Marc CARRE committed 2016-11-09 17:46:52 +00:00
1 parent 9414e2979d
commit b03b3fccc7
3 files changed
+48 -4

No files matched your search

+3
View File
@@ -10,6 +10,7 @@ import (
var checker *checkpoint.Checker
var newVersion atomic.Value
var success atomic.Value
const (
updateCheckPeriod = 6 * time.Hour
@@ -17,9 +18,11 @@ const (
func checkForUpdates(dockerVersion string, network string) {
newVersion.Store("")
success.Store(true)
handleResponse := func(r *checkpoint.CheckResponse, err error) {
if err != nil {
success.Store(false)
Log.Printf("Error checking version: %v", err)
return
}