After the MobileIMSDK is connected, it frequently drops and reconnects, prompting that the session has expired, the other party exits abnormally or the network fails

Scenes

Ruoyi (SpringBoot-based authority management system) integrates MobileIMSDK to implement IM server construction:

https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/111032404

How does MobileIMSDK run the Java server and run it as a jar package:

https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/110128757

Two ways of how to run the Java server code of MobileIMSDK have been recorded above.

However, when using the IM client provided by the community to connect to the modified IM server, there were frequent disconnections and reconnections.

 

Note:

Blog:
https://blog.csdn.net/badao_liumang_qizhi
Follow the public
account Domineering
programmers Get programming-related e-books, tutorial pushes and free downloads.

achieve

Then the background of the IM server always prompts:

The session has expired over time, it is likely that the other party has exited abnormally or the network is faulty, and the closing process will be executed in a way that the session is abnormal.

 

This is caused by the inconsistency of the heartbeat detection frequency set by the server and the client.

Previously, when using the IM server, the frequency of heartbeat detection was changed to MODE_3S, but the frequency of heartbeat detection of the official jar package of the client is MODE_15S

So find the heartbeat frequency in the ServerLanuncherImpl of the server to be consistent with the client

 

Guess you like

Origin blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/114295339