File tree Expand file tree Collapse file tree
manager/state/raft/transport Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ package transport
44
55import (
66 "context"
7+ "math"
78 "net"
89 "sync"
910 "time"
@@ -354,6 +355,15 @@ func (t *Transport) dial(addr string) (*grpc.ClientConn, error) {
354355 return net .DialTimeout ("tcp" , addr , timeout )
355356 }))
356357
358+ // TODO(dperny): this changes the max received message size for outgoing
359+ // client connections. this means if the server sends a message larger than
360+ // this, we will still accept and unmarshal it. i'm unsure what the
361+ // potential consequences are of setting this to be effectively unbounded,
362+ // so after docker/swarmkit#2774 is fixed, we should remove this option
363+ grpcOptions = append (grpcOptions , grpc .WithDefaultCallOptions (
364+ grpc .MaxCallRecvMsgSize (math .MaxInt32 ),
365+ ))
366+
357367 cc , err := grpc .Dial (addr , grpcOptions ... )
358368 if err != nil {
359369 return nil , err
You can’t perform that action at this time.
0 commit comments