Add context.WithTimeout

Closes #41
This commit is contained in:
Miek Gieben 2016-03-24 17:46:14 +00:00
parent 4fe39f9e9e
commit 430f11a6d2
2 changed files with 10 additions and 6 deletions

View file

@ -37,7 +37,7 @@ const (
)
func init() {
ctx = context.TODO()
ctx, _ = context.WithTimeout(ctx.Background(), etcdTimeout)
etcdCfg := etcdc.Config{
Endpoints: []string{"http://localhost:2379"},