Skip to content

[BUG] After the client reconnects in a short period of time, he will be kicked off the line immediately after an occasional reconnection. #3449

@slomode

Description

@slomode

OpenIM Server Version

3.8.3

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Source Code Deployment

Bug Description and Steps to Reproduce

In cluster mode deployment,when the client reconnects after disconnection, it uses the original token to trigger the wsHandler, then calls ws.registerChan, and subsequently notifies other nodes to disconnect the same client's connections on other endpoints.

Image

After that, it calls MultiTerminalLoginCheck on other machines, but the newly created client's token is empty and hasn't been assigned a value.

Image

After that, the old token is invalidated. However, since client.token is empty, PreservedToken remains unset.

Image

Here, all tokens except the new one are supposed to be marked as kickedtoken, but since the incoming token is empty, all tokens end up being flagged as kickedtoken.

Image

During network reconnection, the old token is still used, causing subsequent requests to fail due to token invalidation and being kicked out. This doesn't happen in standalone mode because that logic isn't executed there.

Image

Screenshots Link

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions