reconnectAndRejoin() In UE4 sdk not work.

when i loss connect, i call reconnectAndRejoin(), then i get info:
debugLevel:1, 2016-12-09 16:12:43,041 ERROR Client.cpp ExitGames::LoadBalancing::Client::reconnectAndRejoin() line: 750 - No auth token set.

Comments

  • the reconnectAndRejoin() return false.
    and connectionErrorReturn() be called.
  • In Ue4 skd, how to reconnect an rejoin?
  • Kaiserludi
    Kaiserludi admin
    edited December 2016
    Hi @yinchunlong.

    This has not anything to do with UE4 at all, but behaves the same for all C++ clients.
    Currently reconnectAndRejoin() does only work with Photon Cloud, but not on Photon Server, as Photon server does not set an auth token.

    You can just manually connect and rejoin by first calling connect() and after you got connected calling opJoinRoom() and passing the player number that that player previously had in that room.

    Alternatively you could outcomment the lines
    if(!mAuthenticationValues.getSecret().length())
    			{
    				EGLOG(DebugLevel::ERRORS, L"No auth token set.");
    				return false;
    			}
    in Client.cpp and rebuild LoadBalancing-cpp afterwards to make reconnectAndRejoin() work with Photon Server.
  • ok, thank you very much.
  • Hi @yinchunlong.

    We will change this for the next release.
    Starting with 4.1.5.0 Client::reconnectAndRejoin() will also work out of the box with Photon Server.