Networkingpeer stuck ConnectedToNameServer when attempting to re-connect

Options
My code is effectively:

PhotonNetwork.ConnectUsingSettings PhotonNetwork.Disconnect PhotonNetwork.offlineMode = true PhotonNetwork.offlineMode = false PhotonNetwork.ConnectUsingSettings

The second time it returns true but PhotonNetwork.connected is false and under the covers:

1) The networking peer is connecting to name server
2) Networking Peer IsInitialConnect is true

Any tips to unblock this?

Comments

  • Hi @aschearer,

    this seems to be a known issue which will be fixed in the next release. I'm asking to take a look at this post and try the described solution.

    Please let me know, if this fixes your described issue. If not, please let me also know so that I can have a look at it again.

    One question: do you join a room between enabling and disabling the Offline Mode?
  • aschearer
    Options
    Thanks for the reply. In my testing I am not creating a room. I've tried adding the suggested line from the other thread but the problem persists.
  • aschearer
    Options
    I believe I fixed the issue by invoking PhotonNetwork.Disconnect before setting PHotonNetwork.offlineMode to false.
  • [Deleted User]
    edited July 2018
    Options
    I have tested the steps you have mentioned above in order to reproduce the issue, but it didn't occur in my tests. Is this

    PhotonNetwork.ConnectUsingSettings
    PhotonNetwork.Disconnect
    PhotonNetwork.offlineMode = true
    PhotonNetwork.offlineMode = false
    PhotonNetwork.ConnectUsingSettings


    exactly what you do? Nothing missing in between?

    Do you use the latest PUN version (currently 1.90) from the Asset Store? If you don't use the latest version, I'm asking you to update to the latest version and see, if this solves the problem.