EOS: Best way to handle "abandoned" sessions?


I’m working on a multiplayer game with a listening server. One player can host the game, the rest can find it and join. Imagine a situation when the hosting player disconnected or crashed: such session will persist for some time, but in fact, there is no more game behind it and I want to exclude it from find session results.

My question: what is the best (right?) way to handle such sessions? Is there any way to determine that session’s owner no longer in session without trying to join such session?

When you are getting the list of active sessions, you should check to see if the one you are joining is still valid before joining it. Rebuild the active sessions list if it is not valid, this should clear away any dropped servers in that moment. Getting and joining sessions are both latent actions, so if it does connect to a server which at the same time the host disconnects, the connecting client would get bounced back to their own game instance.

Well, the problem even when the host has left the session he created, the session still exists and valid for some time. I mean, FBlueprintSessionResult is valid. It’s fine from the client’s perspective.