Skip to content

Commit

Permalink
Make connection to ETCD blocking - otherwise it hangs if ETCD can't b…
Browse files Browse the repository at this point in the history
…e contacted
  • Loading branch information
darkdarkdragon committed Jun 9, 2021
1 parent 161537e commit e23cef3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ require (
golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420
golang.org/x/text v0.3.6
google.golang.org/api v0.46.0
google.golang.org/grpc v1.38.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)

Expand Down
2 changes: 2 additions & 0 deletions internal/app/mistapiconnector/mistapiconnector_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"go.etcd.io/etcd/client/pkg/v3/transport"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/client/v3/concurrency"
"google.golang.org/grpc"
)

const streamPlaybackPrefix = "playback_"
Expand Down Expand Up @@ -108,6 +109,7 @@ func NewMac(mistHost string, mapi *mist.API, lapi *livepeer.API, balancerHost st
DialTimeout: etcdDialTimeout,
AutoSyncInterval: etcdAutoSyncInterval,
TLS: tcfg,
DialOptions: []grpc.DialOption{grpc.WithBlock()},
})
if err != nil {
err = fmt.Errorf("mist-api-connector: Error connecting ETCD err=%w", err)
Expand Down

0 comments on commit e23cef3

Please sign in to comment.