Socket io reconnection mechanism

do a mobile phone app chat room, using socket io as a long connection, there is such a problem:
can be used normally after the first successful login, and then exit login (is to exit login, not kill the app process), and then re-login, you can enter the chat room interface, but can not send messages, excuse me, is there a great god to know how it is? Ask for guidance!

Apr.13,2021

the socket logged in for the first time was not killed after exiting, and another socket link was generated after the second login, but the chat was sent with the first socket

.
Menu