How to cancel connection attempt?

Hello!
I want to make a multiplayer game, and there is an option to connect to IP.
I’m doing this with OpenLevel IP ( or console command open=IP).
My question is, how to cancel the connection attempt? Blueprint or C++, doesn’t matter.

Tried:

  • DestroySession( but it’s not a session, so obviously doesnt work )
  • UWorld::CancelPendingMapChange
  • console command disconnect ( which strangely starts the default map… )
1 Like

Do you solve the problem yet? I have the same problem. I am so glad if you tell me the solution

I know it’s and old post, but I finally got the solution.
If the game is not yet in loading state, you can cancel the connection by:
GEngine->CancelPending( GetWorld() );

It will cancel the pending connection, and you can try again.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.