Skip to content

Commit 15b0843

Browse files
author
Matthew Fisher
committed
fix(logspout): add etcd client request timeout
1 parent 1280daf commit 15b0843

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

logspout/logspout.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"os"
1111
"strconv"
1212
"strings"
13+
"time"
1314

1415
"code.google.com/p/go.net/websocket"
1516
"github.com/coreos/go-etcd/etcd"
@@ -143,6 +144,7 @@ func main() {
143144
connectionString := []string{"http://" + etcdHost + ":4001"}
144145
debug("etcd:", connectionString[0])
145146
etcd := etcd.NewClient(connectionString)
147+
etcd.SetDialTimeout(3 * time.Second)
146148
hostResp, err := etcd.Get("/deis/logs/host", false, false)
147149
assert(err, "url")
148150
portResp, err := etcd.Get("/deis/logs/port", false, false)

0 commit comments

Comments
 (0)