debug: print stack

pull/594/head
wangchuxiao 2 years ago
parent 2d350366b7
commit ed1747aba6

@ -18,6 +18,8 @@ import (
"context" "context"
"encoding/json" "encoding/json"
"errors" "errors"
"fmt"
"runtime/debug"
"github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush" "github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush"
"github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush/fcm" "github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush/fcm"
@ -255,6 +257,7 @@ func (p *Pusher) GetConnsAndOnlinePush(ctx context.Context, msg *sdkws.MsgData,
if err != nil { if err != nil {
return nil, err return nil, err
} }
fmt.Println(string(debug.Stack()))
// Online push message // Online push message
for _, v := range conns { for _, v := range conns {
msgClient := msggateway.NewMsgGatewayClient(v) msgClient := msggateway.NewMsgGatewayClient(v)

@ -18,7 +18,6 @@ import (
"context" "context"
"errors" "errors"
"fmt" "fmt"
"runtime/debug"
"strings" "strings"
"google.golang.org/grpc" "google.golang.org/grpc"
@ -32,7 +31,6 @@ import (
) )
func GrpcClient() grpc.DialOption { func GrpcClient() grpc.DialOption {
fmt.Println("grpc client interceptor", "stack", string(debug.Stack()))
return grpc.WithChainUnaryInterceptor(RpcClientInterceptor) return grpc.WithChainUnaryInterceptor(RpcClientInterceptor)
} }

@ -19,7 +19,6 @@ import (
"fmt" "fmt"
"math" "math"
"runtime" "runtime"
"runtime/debug"
"strings" "strings"
"github.com/OpenIMSDK/Open-IM-Server/pkg/checker" "github.com/OpenIMSDK/Open-IM-Server/pkg/checker"
@ -178,6 +177,5 @@ func RpcServerInterceptor(
} }
func GrpcServer() grpc.ServerOption { func GrpcServer() grpc.ServerOption {
fmt.Println("grpc server interceptor", "stack", string(debug.Stack()))
return grpc.ChainUnaryInterceptor(RpcServerInterceptor) return grpc.ChainUnaryInterceptor(RpcServerInterceptor)
} }

Loading…
Cancel
Save