How do I release a client from a zombie session? (EOS, C++)

I have a problem handling sessions in a concrete case.

The case is as follows:
I can do this multiple times without problems.

*Server (listening server):
-Create Session
-Server Travel

*Client:
-Find
-Join
-Client Travel
-Register
-Start Session

*Server (Run on client):
-End Session
-Unregister Clients
-Destroy Session

The problem is when the server application is killed for some reason when the client is joined to the session.

In this case the server had no opportunity to execute these steps.

*Server (Run on client):
-End Session
-Unregister Clients
-Destroy Session

The client was kicked off the map but it was left joined to a zombie session. (the session still exists but the server no longer exists). At this point the client cannot join another session from other servers.

So I’m looking for a way to handle this situation. I want to free the client from this zombie session.

I tried to run these steps in the event “HandleNetworkFailure” but it doesn’t work…

*Client
-End Session
-Unregister Clients
-Destroy Session

How can I force the unjoint of the client and the session in this case?
What steps should I follow?
In which event should I handle it?

I am using the online subsystem and EOS with C++
Thank you so much!!

I managed to do it using a different GameMode. In the PostLogin event.

It’s not quite finished yet, but it works.

*It has some things unresolved.
-For example, get the session name.

It is possible that this is not the most suitable event to do this. (Please let me know if you know of a better place to do this).

However, I have not found sample code to do this. And yes, I have seen the code of Lyra, ShooterGame and many others…

It seems that the management of the online subsystem is like the secret of the Coca-Cola formula.

I have learned to use EOS by banging my head against the raw code.

So I ask the development team to provide us with usage examples. There is no need to make developers suffer.

No matter how intelligent we are, we do not reach the level of being fortune tellers.

Thank you so much!!

This works much better.

Task causes a lot of problems. But this way it works fine.

I hope it helps someone… I’ve been testing for several days until I got this solution.


Why does Epic develop an API and not show how to use it?


And… why this doesn’t work?

playerContoller->PlayerState->SessionName

gameMode->GameSession->SessionName

Is there a way to get the real name of the session?


Thank you so much!!

1 Like