mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-20 05:07:05 +08:00
debug: print stack
This commit is contained in:
parent
07c7a3668b
commit
2d350366b7
@ -42,7 +42,6 @@ type (
|
|||||||
friend *rpcclient.FriendRpcClient
|
friend *rpcclient.FriendRpcClient
|
||||||
GroupLocalCache *localcache.GroupLocalCache
|
GroupLocalCache *localcache.GroupLocalCache
|
||||||
ConversationLocalCache *localcache.ConversationLocalCache
|
ConversationLocalCache *localcache.ConversationLocalCache
|
||||||
MessageLocker MessageLocker
|
|
||||||
Handlers MessageInterceptorChain
|
Handlers MessageInterceptorChain
|
||||||
notificationSender *rpcclient.NotificationSender
|
notificationSender *rpcclient.NotificationSender
|
||||||
}
|
}
|
||||||
@ -91,7 +90,6 @@ func Start(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) e
|
|||||||
GroupLocalCache: localcache.NewGroupLocalCache(&groupRpcClient),
|
GroupLocalCache: localcache.NewGroupLocalCache(&groupRpcClient),
|
||||||
ConversationLocalCache: localcache.NewConversationLocalCache(&conversationClient),
|
ConversationLocalCache: localcache.NewConversationLocalCache(&conversationClient),
|
||||||
friend: &friendRpcClient,
|
friend: &friendRpcClient,
|
||||||
MessageLocker: NewLockerMessage(cacheModel),
|
|
||||||
}
|
}
|
||||||
s.notificationSender = rpcclient.NewNotificationSender(rpcclient.WithLocalSendMsg(s.SendMsg))
|
s.notificationSender = rpcclient.NewNotificationSender(rpcclient.WithLocalSendMsg(s.SendMsg))
|
||||||
s.addInterceptorHandler(MessageHasReadEnabled)
|
s.addInterceptorHandler(MessageHasReadEnabled)
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package msg
|
package locker
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@ -18,6 +18,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"runtime/debug"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
@ -31,6 +32,7 @@ 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,6 +19,7 @@ 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"
|
||||||
@ -177,5 +178,6 @@ 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…
x
Reference in New Issue
Block a user