open-im-sdk-web-wasm icon indicating copy to clipboard operation
open-im-sdk-web-wasm copied to clipboard

Opening two chat windows in the same browser on the WEB side will result in a long link request being sent after 26 seconds

Open ssuperhao opened this issue 1 year ago • 1 comments

What happened?

我们的WEB端是允许多端登录的,如果同一个浏览器开两个页面的话,26秒之后才能发送长链接请求。如果只保持一个窗口,页面一渲染就能发送长链接请求。初步判定是不是因为两个窗口都会走wasm里面的逻辑去处理本地数据,导致数据库存在资源竞争。并且先开的那个页面会报错: image

What did you expect to happen?

希望WEB端允许多端登录的情况下,不管同一个浏览器开多少个聊天窗口,都不影响长链接请求的发送时间。

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

首先允许WEB端能够多端登录,然后先在浏览器里面打开一个聊天窗口,等到聊天链接成功之后,再打开一个新的聊天窗口,这个时候就能发现新开的聊天窗口要等很久才能链接成功(长链接请求接口才会发出)。

Anything else we need to know?

No response

version

```console $ {name} version # paste output here ```

Cloud provider

OS version

```console # On Linux: $ cat /etc/os-release # paste output here $ uname -a # paste output here # On Windows: C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture # paste output here ```

Install tools

ssuperhao avatar Apr 10 '24 09:04 ssuperhao

There may be problems when multiple windows operate indexdb through absurd-sql at the same time.

Bloomingg avatar Aug 07 '24 06:08 Bloomingg