Pass context to ListReleases when checking for new versions.

Required by go-github update.
This commit is contained in:
Timo Reimann 2017-03-14 01:47:28 +01:00 committed by Emile Vauge
parent a507cb4835
commit e011792a90
No known key found for this signature in database
GPG key ID: D808B4C167352E59

View file

@ -1,6 +1,7 @@
package version package version
import ( import (
"context"
"net/url" "net/url"
"github.com/containous/traefik/log" "github.com/containous/traefik/log"
@ -29,7 +30,7 @@ func CheckNewVersion() {
return return
} }
client.BaseURL = updateURL client.BaseURL = updateURL
releases, resp, err := client.Repositories.ListReleases("containous", "traefik", nil) releases, resp, err := client.Repositories.ListReleases(context.Background(), "containous", "traefik", nil)
if err != nil { if err != nil {
log.Warnf("Error checking new version: %s", err) log.Warnf("Error checking new version: %s", err)
return return