|
|
|
@ -4,6 +4,9 @@ import (
|
|
|
|
|
"context"
|
|
|
|
|
"errors"
|
|
|
|
|
"fmt"
|
|
|
|
|
"runtime/debug"
|
|
|
|
|
"sync"
|
|
|
|
|
|
|
|
|
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/apiresp"
|
|
|
|
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
|
|
|
|
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
|
|
|
|
@ -11,8 +14,6 @@ import (
|
|
|
|
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
|
|
|
|
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
|
|
|
|
|
"github.com/golang/protobuf/proto"
|
|
|
|
|
"runtime/debug"
|
|
|
|
|
"sync"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var ErrConnClosed = errors.New("conn has closed")
|
|
|
|
@ -160,7 +161,7 @@ func (c *Client) handleMessage(message []byte) error {
|
|
|
|
|
case WsSetBackgroundStatus:
|
|
|
|
|
resp, messageErr = c.setAppBackgroundStatus(ctx, binaryReq)
|
|
|
|
|
default:
|
|
|
|
|
return errors.New(fmt.Sprintf("ReqIdentifier failed,sendID:%d,msgIncr:%s,reqIdentifier:%s", binaryReq.SendID, binaryReq.MsgIncr, binaryReq.ReqIdentifier))
|
|
|
|
|
return fmt.Errorf("ReqIdentifier failed,sendID:%s,msgIncr:%s,reqIdentifier:%d", binaryReq.SendID, binaryReq.MsgIncr, binaryReq.ReqIdentifier)
|
|
|
|
|
}
|
|
|
|
|
c.replyMessage(ctx, &binaryReq, messageErr, resp)
|
|
|
|
|
return nil
|
|
|
|
|