From 0e71619115051aa6df2635efbee7f80f389dd14b Mon Sep 17 00:00:00 2001 From: Mahak Mukhi Date: Thu, 9 Mar 2017 17:48:37 -0800 Subject: [PATCH] making client consistent with server --- clientconn.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/clientconn.go b/clientconn.go index 1bf824bc7c44..1ba592c500cf 100644 --- a/clientconn.go +++ b/clientconn.go @@ -307,6 +307,7 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn * conns: make(map[Address]*addrConn), } cc.ctx, cc.cancel = context.WithCancel(context.Background()) + cc.dopts.maxMsgSize = defaultClientMaxMsgSize for _, opt := range opts { opt(&cc.dopts) } @@ -315,9 +316,6 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn * ctx, cancel = context.WithTimeout(ctx, cc.dopts.timeout) defer cancel() } - if cc.dopts.maxMsgSize == 0 { - cc.dopts.maxMsgSize = defaultClientMaxMsgSize - } defer func() { select {