ServerTravel and UpdateSession

My Game Project is based on ShooterGame, but instead of running listen server, I modified it to adopt a dedicated server/client structure. My game client is using online subsystem to find and join my dedicated game server. I have managed to do this successfully. But when it comes to change map and game mode, I got issues like client lost connection.

Currently, the procedure I change map and game mode is like this.

  1. Call function IOnlineSessionPtr->UpdateSession() with the new map and game mode;

  2. Then upon update success, Call ServerTavel with new map and game mode in the callback function, which bind to OnUpdateSessionComplete delegate.

Both My server and client are traveled to the new map, but my client got freeze for a while then lost connection. I tried set seamlessTravel to true/false, or pass to the clientTravel with connection string get from GetResolvedConnectString. None of them worked. Any ideas?

Or instead of UpdateSession, should I Endsession and CreateSession every time I change Map and GameMode(match)? I want players to be able to iterate over all the GameModes without being disconnected.

Try adding ?listen to the end of your map name for the server. This should allow the client to make a connection.

I’m not that good in C++ Networking, but do you have a Log File that you could use to determine the error? I’m pretty sure the ShooterGame uses lots of Log commands to generate a Log File where you can find reasons for disconnects etc (Like GameSession failed or something like this).

I guess this would help to find your Error, although i can’t tell you if there isn’t just a simple solution to your problem.