mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-03 10:52:33 +08:00
ws
This commit is contained in:
parent
8491023896
commit
16a3c97169
@ -430,10 +430,11 @@ func (ws *WsServer) ParseWSArgs(r *http.Request) (args *WSArgs, err error) {
|
||||
defer func() {
|
||||
args = &v
|
||||
}()
|
||||
query := r.URL.Query()
|
||||
v.MsgResp, _ = strconv.ParseBool(query.Get(MsgResp))
|
||||
if ws.onlineUserConnNum.Load() >= ws.wsMaxConnNum {
|
||||
return nil, errs.ErrConnOverMaxNumLimit.Wrap("over max conn num limit")
|
||||
}
|
||||
query := r.URL.Query()
|
||||
if v.Token = query.Get(Token); v.Token == "" {
|
||||
return nil, errs.ErrConnArgsErr.Wrap("token is empty")
|
||||
}
|
||||
@ -458,7 +459,6 @@ func (ws *WsServer) ParseWSArgs(r *http.Request) (args *WSArgs, err error) {
|
||||
if r.Header.Get(Compression) == GzipCompressionProtocol {
|
||||
v.Compression = true
|
||||
}
|
||||
v.MsgResp, _ = strconv.ParseBool(query.Get(MsgResp))
|
||||
m, err := ws.cache.GetTokensWithoutError(context.Background(), v.UserID, platformID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user