Observations: Disconnection while changing Scene and Authentication Ticket Expired

We were able to solve most of our issues by rewriting the back end with help from the forum thank you everyone who contributed. However we noticed two strange behaviours on which we need further discussion:

Observations:

1) When we get disconnection for long game plays or by staying in background for extended time Authentication Ticket Expired, both Reconnect() and ReconnectAndRejion() return true so we never end up on ConnectUsingSetting() method. However to handle this, when Disconnection cause is AuthTicketExpired, we specifically use ConnectUsingSettings method instead of our usual method which retries using Reconnect Method. In our opinion Reconnect methods should return false once cause is AuthTicket Expired.

2) If we set Room.IsVisible = false after a match and switch Scene player gets "Disconnected by ServerLogic" because RTT/Variance is too much, perhaps lobby is being updated when we go offline. Tried sending all Commands before pausing message queue but it didn't help. We ended up doing only Room.IsOpen = false, and handling "GameDoesNotExists" in race conditions for someone ends up in a room which gets closed. By avoiding IsVisble value our disconnections while changing scenes has dropped to 0. Just by enabling this brings us to random Disconnects.


Question:
Is it necessary to join an SQL Lobby, Leave, and then create a Room to be listed in that lobby, or is it enough to Create a room with an SQL Lobby Type as a parameter, and the room will be listed in that Lobby?

We're using 1.88

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Harris,

    Thank you for your observations, we will take a deeper look at each one.

    To answer your question:

    No need to join a lobby in order to create a room inside it.
    However, SQL lobby should not be used to list rooms (show list of rooms to the player). The only recommended lobby type for rooms listing is the default one.
    So we think that it does not make sense to join a lobby if its type is different from default and it does not make sense to join a lobby if you are not going to display list of rooms to the player.
  • Harris
    Harris
    edited March 2018
    @JohnTube Thanks for clarification. We are not listing rooms from the lobby. Just wanted to clear the confusion.

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hey @Harris,

    Could you have a minimal repo project for your observations? especially number 2.
    That would help us a lot!
  • I'll see if I can put it together in a day or two. For now you can have a look at code extract from the title, we're editing and making it modular, but I shared it on public repo so other people can contribute as well.


    File:

    https://github.com/harrisbinkhurram/PhotonUnityTemplate/blob/master/States/MatchMaking/RandomMatchMaking/StateRandomMatchMakingHost.cs

    If we uncomment IsVisible property Disconnected By Server Logic issue appears and we had to handle disconnects separately in this state. Enabling verbose/full logging, RTT/Variance was causing the disconnect. Tried many other changes, but narrowed it down to this property. After this change disconnects never happened and we didn't have to override disconnect method and go for Online Battle.