debug: print stack

pull/594/head
wangchuxiao 2 years ago
parent 07c7a3668b
commit 2d350366b7

@ -42,7 +42,6 @@ type (
friend *rpcclient.FriendRpcClient
GroupLocalCache *localcache.GroupLocalCache
ConversationLocalCache *localcache.ConversationLocalCache
MessageLocker MessageLocker
Handlers MessageInterceptorChain
notificationSender *rpcclient.NotificationSender
}
@ -91,7 +90,6 @@ func Start(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) e
GroupLocalCache: localcache.NewGroupLocalCache(&groupRpcClient),
ConversationLocalCache: localcache.NewConversationLocalCache(&conversationClient),
friend: &friendRpcClient,
MessageLocker: NewLockerMessage(cacheModel),
}
s.notificationSender = rpcclient.NewNotificationSender(rpcclient.WithLocalSendMsg(s.SendMsg))
s.addInterceptorHandler(MessageHasReadEnabled)

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package msg
package locker
import (
"context"

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

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

Loading…
Cancel
Save