fix
This commit is contained in:
@@ -31,15 +31,12 @@ func NewCommonNotifyLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Comm
|
||||
// }
|
||||
|
||||
func (l *CommonNotifyLogic) CommonNotify(req *types.CommonNotifyReq, userinfo *auth.UserInfo) (resp *basic.Response) {
|
||||
if req.Data == "" {
|
||||
return resp.SetStatusWithMessage(basic.CodeRequestParamsErr, "data is empty")
|
||||
}
|
||||
//websocket连接id不能为空
|
||||
if req.WebsocketId == "" {
|
||||
if req.Wid == "" {
|
||||
return resp.SetStatusWithMessage(basic.CodeRequestParamsErr, "websocket connect id is empty")
|
||||
}
|
||||
//查询websocket连接
|
||||
value, ok := mapConnPool.Load(req.WebsocketId)
|
||||
value, ok := mapConnPool.Load(req.Wid)
|
||||
if !ok {
|
||||
return resp.SetStatusWithMessage(basic.CodeOK, "success,but connection is not found")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user