Skip to content

Commit

Permalink
[FAB-3110] Add dialTimeout to gossip comm in prod
Browse files Browse the repository at this point in the history
The dial timeout is only set in code paths that are in tests.
In production, the gossip layers inherit dial options that are
set in gossip_service, which doesn't set a dial timeout.

Change-Id: Icf4e2f1622712e6c5fe9dda7de52a172c08a6170
Signed-off-by: Yacov Manevich <yacovm@il.ibm.com>
  • Loading branch information
yacovm committed Apr 12, 2017
1 parent 118f82f commit 89d5671
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gossip/comm/comm_impl.go
Expand Up @@ -124,6 +124,7 @@ func NewCommInstanceWithServer(port int, idMapper identity.Mapper, peerIdentity

// NewCommInstance creates a new comm instance that binds itself to the given gRPC server
func NewCommInstance(s *grpc.Server, cert *tls.Certificate, idStore identity.Mapper, peerIdentity api.PeerIdentityType, dialOpts ...grpc.DialOption) (Comm, error) {
dialOpts = append(dialOpts, grpc.WithTimeout(util.GetDurationOrDefault("peer.gossip.dialTimeout", defDialTimeout)))
commInst, err := NewCommInstanceWithServer(-1, idStore, peerIdentity, dialOpts...)
if err != nil {
return nil, err
Expand Down

0 comments on commit 89d5671

Please sign in to comment.