Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions manager/state/raft/transport/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package transport

import (
"context"
"math"
"net"
"sync"
"time"
Expand Down Expand Up @@ -354,6 +355,15 @@ func (t *Transport) dial(addr string) (*grpc.ClientConn, error) {
return net.DialTimeout("tcp", addr, timeout)
}))

// TODO(dperny): this changes the max received message size for outgoing
// client connections. this means if the server sends a message larger than
// this, we will still accept and unmarshal it. i'm unsure what the
// potential consequences are of setting this to be effectively unbounded,
// so after docker/swarmkit#2774 is fixed, we should remove this option
grpcOptions = append(grpcOptions, grpc.WithDefaultCallOptions(
grpc.MaxCallRecvMsgSize(math.MaxInt32),
))

cc, err := grpc.Dial(addr, grpcOptions...)
if err != nil {
return nil, err
Expand Down