Why is a client's JoinSession call successful when joining a listen server where the Host left?

Hello all. I’m kinda stuck on a networking problem looking for ideas.

Game has multiplayer host/join session functionally using the Advanced Sessions Plugin.
So If…

  • Player1 hosts listen server
  • Player2 searches for sessions
  • Player2 finds Player1’s listen server, and populates in list/UMG
  • Player1 leaves / destroys session

…Since Player2 is still able to see a copy of Player1’s session (because the server list isn’t refreshed) and calls JoinSession, it is successful and puts Player2 in loop trying to connect to it until InitialConnectTimeout eventually puts it to rest.

So I’m wondering… Is there a way to make join session throw “OnFailure” in this scenario? Or is there a way to update the Blueprint Session Result to get the most recent settings before calling JoinSession?

Some troubleshooting I’ve tried/seen:

  • It seems that the Find Sessions blueprint function populates a list of BP Session results with the state/settings when it found it (snapshot) so I can’t check if it’s empty by getting current players or checking session settings accurately because the data will not be “up to date”
  • No NetworkError is thrown in Game Instance regarding outdated server or some sort when client tries to join this session that essentially doesn’t exist anymore
  • Confirmed that the Host destroys it’s session on logout, or when backing out of the lobby screen
  • Editing InitialConnectTimeout to a short time (5 secs) in /Script/OnlineSubsystemUtils.IpNetDriver works but… it causes issues with my non-seamless travel from lobby to game (causing clients will disconnect prematurely) so I want to avoid this.

Thanks in advance for any tips/tricks/ideas :slight_smile:

This is resolved. Issue was that I was testing through the editor (stand alone). When I tried to recreate the issue on a packaged build on different computers this issue does not appear. (JoinSession returns failure, which is expected)