rpc: fix config bugs (#17)

Signed-off-by: disksing <i@disksing.com>
This commit is contained in:
disksing 2019-04-19 21:01:11 +08:00 committed by GitHub
parent 940d55927c
commit 5efdb149b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -155,10 +155,10 @@ func newConnArray(addr string, conf *config.RPC) (*connArray, error) {
a := &connArray{ a := &connArray{
conf: conf, conf: conf,
index: 0, index: 0,
conns: make([]*grpc.ClientConn, conf.GrpcMaxCallMsgSize), conns: make([]*grpc.ClientConn, conf.MaxConnectionCount),
streamTimeout: make(chan *Lease, 1024), streamTimeout: make(chan *Lease, 1024),
batchCommandsCh: make(chan *batchCommandsEntry, conf.Batch.MaxBatchSize), batchCommandsCh: make(chan *batchCommandsEntry, conf.Batch.MaxBatchSize),
batchCommandsClients: make([]*batchCommandsClient, 0, conf.GrpcMaxCallMsgSize), batchCommandsClients: make([]*batchCommandsClient, 0, conf.Batch.MaxBatchSize),
transportLayerLoad: 0, transportLayerLoad: 0,
} }
if err := a.Init(addr); err != nil { if err := a.Init(addr); err != nil {