pull/458/head
wangchuxiao 2 years ago
parent 0eb1858408
commit 60afea092b

@ -5,7 +5,6 @@ import (
"errors"
"fmt"
"strings"
"time"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
@ -54,7 +53,7 @@ func RpcClientInterceptor(ctx context.Context, method string, req, resp interfac
}
func getRpcContext(ctx context.Context, method string) (context.Context, error) {
ctx, _ = context.WithTimeout(ctx, time.Second*5)
// ctx, _ = context.WithTimeout(ctx, time.Second*5)
md := metadata.Pairs()
if keys, _ := ctx.Value(constant.RpcCustomHeader).([]string); len(keys) > 0 {
for _, key := range keys {

@ -25,10 +25,6 @@ func (r *Resolver) ResolveNowZK(o resolver.ResolveNowOptions) {
return
}
r.addrs = newConns
if len(newConns) == 0 {
log.ZError(context.Background(), "conn is nil", nil)
return
}
if err := r.cc.UpdateState(resolver.State{Addresses: newConns}); err != nil {
log.ZError(context.Background(), "UpdateState error, conns is nil from svr", err, "conns", newConns, "zk path", r.target.URL.Path)
return

Loading…
Cancel
Save