making client consistent with server

This commit is contained in:
Mahak Mukhi 2017-03-09 17:48:37 -08:00
parent b9b6d48985
commit 0e71619115
1 changed files with 1 additions and 3 deletions

View File

@ -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 {