openimsdk / oimws

A websocket and tcp framework for openim
MIT License
17 stars 14 forks source link

同一userID使用不同platformID申请到不同的token, 用jssdk登录, 会出现概率无法监听到新消息的情况 #115

Open PaoPaoYo opened 4 months ago

PaoPaoYo commented 4 months ago

What happened?

使用同一个userID+2个不同的platformID, 获得到2个不同的token, 在2个浏览器窗口分别使用这些token登录, 并监听新消息(IMSDK.on(CbEvents.OnRecvNewMessages)), 会概率性出现 其中一个窗口监听不到新消息

What did you expect to happen?

两个窗口都能正常使用

How can we reproduce it (as minimally and precisely as possible)?

  1. 使用同一个userID+2个不同的platformID, 获得到2个不同的token(使用api中/auth/user_token)
  2. openim-server 配置多端登陆为10(multiLoginPolicy: 10)
  3. 在2个浏览器窗口分别使用这些token登录, 并监听新消息(IMSDK.on(CbEvents.OnRecvNewMessages))
  4. 发送消息给第一步的userID image
PaoPaoYo commented 4 months ago

这不是完整的oimws日志文件, 仅保留了事发的日志 openim-websocket-service.zip

cubxxw commented 4 months ago

@FGadvancer

kubbot commented 1 month ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.