mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-08-24 22:59:52 +08:00
ws update
This commit is contained in:
parent
52f49140b2
commit
a0d61769b2
@ -71,7 +71,7 @@ func (c *Client) readMessage() {
|
|||||||
if r := recover(); r != nil {
|
if r := recover(); r != nil {
|
||||||
fmt.Println("socket have panic err:", r, string(debug.Stack()))
|
fmt.Println("socket have panic err:", r, string(debug.Stack()))
|
||||||
}
|
}
|
||||||
//c.close()
|
c.close()
|
||||||
}()
|
}()
|
||||||
//var returnErr error
|
//var returnErr error
|
||||||
for {
|
for {
|
||||||
|
@ -71,7 +71,7 @@ func (p *Pusher) MsgToUser(ctx context.Context, userID string, msg *sdkws.MsgDat
|
|||||||
}
|
}
|
||||||
isOfflinePush := utils.GetSwitchFromOptions(msg.Options, constant.IsOfflinePush)
|
isOfflinePush := utils.GetSwitchFromOptions(msg.Options, constant.IsOfflinePush)
|
||||||
//log.NewInfo(operationID, "push_result", wsResults, "sendData", msg, "isOfflinePush", isOfflinePush)
|
//log.NewInfo(operationID, "push_result", wsResults, "sendData", msg, "isOfflinePush", isOfflinePush)
|
||||||
log.ZDebug(ctx, "push_result", "ws push result", wsResults, "sendData", msg, "isOfflinePush", isOfflinePush)
|
log.ZDebug(ctx, "push_result", "ws push result", wsResults, "sendData", msg, "isOfflinePush", isOfflinePush, "push_to_userID", userID)
|
||||||
p.successCount++
|
p.successCount++
|
||||||
if isOfflinePush && userID != msg.SendID {
|
if isOfflinePush && userID != msg.SendID {
|
||||||
// save invitation info for offline push
|
// save invitation info for offline push
|
||||||
@ -177,6 +177,7 @@ func (p *Pusher) MsgToSuperGroupUser(ctx context.Context, groupID string, msg *s
|
|||||||
|
|
||||||
func (p *Pusher) GetConnsAndOnlinePush(ctx context.Context, msg *sdkws.MsgData, pushToUserIDs []string) (wsResults []*msggateway.SingleMsgToUserResults, err error) {
|
func (p *Pusher) GetConnsAndOnlinePush(ctx context.Context, msg *sdkws.MsgData, pushToUserIDs []string) (wsResults []*msggateway.SingleMsgToUserResults, err error) {
|
||||||
conns, err := p.client.GetConns(config.Config.RpcRegisterName.OpenImMessageGatewayName)
|
conns, err := p.client.GetConns(config.Config.RpcRegisterName.OpenImMessageGatewayName)
|
||||||
|
log.ZDebug(ctx, "get gateway conn", "conn length", len(conns))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -185,7 +186,6 @@ func (p *Pusher) GetConnsAndOnlinePush(ctx context.Context, msg *sdkws.MsgData,
|
|||||||
msgClient := msggateway.NewMsgGatewayClient(v)
|
msgClient := msggateway.NewMsgGatewayClient(v)
|
||||||
reply, err := msgClient.SuperGroupOnlineBatchPushOneMsg(ctx, &msggateway.OnlineBatchPushOneMsgReq{MsgData: msg, PushToUserIDs: pushToUserIDs})
|
reply, err := msgClient.SuperGroupOnlineBatchPushOneMsg(ctx, &msggateway.OnlineBatchPushOneMsgReq{MsgData: msg, PushToUserIDs: pushToUserIDs})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if reply != nil && reply.SinglePushResult != nil {
|
if reply != nil && reply.SinglePushResult != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user