Skip to content

Commit 89d5671

Browse files
committed
[FAB-3110] Add dialTimeout to gossip comm in prod
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 <[email protected]>
1 parent 118f82f commit 89d5671

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

gossip/comm/comm_impl.go

+1
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ func NewCommInstanceWithServer(port int, idMapper identity.Mapper, peerIdentity
124124

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

0 commit comments

Comments
 (0)