Skip to content

Commit

Permalink
making client consistent with server
Browse files Browse the repository at this point in the history
  • Loading branch information
MakMukhi committed Mar 10, 2017
1 parent b9b6d48 commit 0e71619
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions clientconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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 {
Expand Down

0 comments on commit 0e71619

Please sign in to comment.