This commit is contained in:
wangchuxiao
2023-04-19 17:21:05 +08:00
parent 3fa1a5c485
commit 6b9353d7b5
4 changed files with 34 additions and 5 deletions
+4 -3
View File
@@ -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