mirror of https://github.com/grpc/grpc-go.git
making client consistent with server
This commit is contained in:
parent
b9b6d48985
commit
0e71619115
|
@ -307,6 +307,7 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn *
|
||||||
conns: make(map[Address]*addrConn),
|
conns: make(map[Address]*addrConn),
|
||||||
}
|
}
|
||||||
cc.ctx, cc.cancel = context.WithCancel(context.Background())
|
cc.ctx, cc.cancel = context.WithCancel(context.Background())
|
||||||
|
cc.dopts.maxMsgSize = defaultClientMaxMsgSize
|
||||||
for _, opt := range opts {
|
for _, opt := range opts {
|
||||||
opt(&cc.dopts)
|
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)
|
ctx, cancel = context.WithTimeout(ctx, cc.dopts.timeout)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
}
|
}
|
||||||
if cc.dopts.maxMsgSize == 0 {
|
|
||||||
cc.dopts.maxMsgSize = defaultClientMaxMsgSize
|
|
||||||
}
|
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
select {
|
select {
|
||||||
|
|
Loading…
Reference in New Issue