Please help immediately?!

Options
When the user loses connection with the server, I want to return it to the main lobby, but the photon bolt crashes and prevents it from joining the server automatically. I cannot connect the user to the server without reopening the application.

Comments

  • ramonmelo
    ramonmelo mod
    edited September 2020
    Options
    Hello @yessGlory17 ,

    Which Bolt version are you using? (the original issue template help us the know better your scenario from start)

    By just adding this snippet to any GlobalEventListener that is currently running on the Scene, you should be able to catch the Timeout error and load the Scene with Index 0.
    This works for both the client and the server;
    public override void BoltShutdownBegin(AddCallback registerDoneCallback, UdpConnectionDisconnectReason disconnectReason)
    {
        registerDoneCallback(() =>
        {
            Debug.LogFormat("Shutdown Done with Reason: {0}", disconnectReason);
            SceneManager.LoadScene(0);
        });
    }
    


    Which errors do you see? Can you send us the logs?

    Also, in order to detect that a remote peer has disconnected just override the Disconnected on any GlobalEventListener on your scene:

    public override void Disconnected(BoltConnection connection)
    {
        Debug.LogFormat("{0} disconnected", connection.RemoteEndPoint);
    }
    


    --
    Ramon Melo
    Photon Bolt Team