I'm implementing it while studying web messenger, but currently, I've completed the implementation of the conversation between the users. The problem is that when one of the users ends the connection (logout or browser termination), the connection is disconnected and left in the room. So if you reconnect, there is no room information, so you have to talk again.
What I thought was that when I join the room, I save the room information in the db (room name or chat record), and when I access it, I find the room I belong to, and when it exists, I re-join all the chat records.
Or is there another solution, or is there a way to maintain the connection even if it ends?
I'm sorry for the question that's so lame and please answer it.
node.js socket.io mongodb
The way you thought about it is correct.
When the conversation starts, create a chat room and record participation information in the chat room on the DB, etc. (Room number, participants)
1753 I want to run pyautogui without remote connection on Windows 10 in the cloud
3080 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
2564 I want to display multiple lines with FFmpeg subtitles.
1789 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2026 OneMinuteCode. All rights reserved.