setReconnectKickEnable

public abstract void setReconnectKickEnable(boolean enable)

Sets whether to kick out the reconnecting device during reconnection.

If the user has not enabled multi-device login, when the same account logs in on a new device, the account will be kicked out from the previously logged-in device. Due to the SDK's reconnection mechanism, the following scenario may occur: The user logs in on device A, but device A has an unstable network connection and fails to connect. The SDK initiates a reconnection mechanism. Meanwhile, the user logs in on device B, and device B successfully connects. When device A's network stabilizes, the user successfully connects on device A, and device B is kicked out. This interface is designed to address such scenarios. When enable is set to true, if the SDK detects that another device has successfully connected during reconnection, it will not forcibly kick out the already connected device but instead kick out the reconnecting device.Note: 1. This feature requires submitting a ticket to enable it on the server side before the client-side method takes effect. 2. This method must be called before init.

Since

5.0.0

Parameters

enable

Whether to kick out the reconnecting device