|
|
@ -5,7 +5,6 @@ import (
|
|
|
|
"errors"
|
|
|
|
"errors"
|
|
|
|
"fmt"
|
|
|
|
"fmt"
|
|
|
|
"strings"
|
|
|
|
"strings"
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
|
|
|
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
|
|
|
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
|
|
|
|
"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) {
|
|
|
|
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()
|
|
|
|
md := metadata.Pairs()
|
|
|
|
if keys, _ := ctx.Value(constant.RpcCustomHeader).([]string); len(keys) > 0 {
|
|
|
|
if keys, _ := ctx.Value(constant.RpcCustomHeader).([]string); len(keys) > 0 {
|
|
|
|
for _, key := range keys {
|
|
|
|
for _, key := range keys {
|
|
|
|