PingCloudRegions.PingAllRegions freezes my app

Options
Hello!
We use PUN in our iOS app.
We encounter situation when our app freezes on first launch after install for ~30 seconds, when we have problems with our network.

We found that PingCloudRegions.PingAllRegions tries to ping cloud servers.
We also found that it does this on main thread (as we understand).
We always use only one region, and we do not want to ping all region servers.
We do not want for this situation to happen with our users on first launch of app.
Are there any way to disable ping on first launch (to completely remove this step)?

Thank you.

Comments

  • Tobias
    Options
    PingAllRegions is using Coroutines and leaves the Thread-management to Unity. I can't really say if it's on main thread but obviously it blocks your client.
    To skip this step, please edit PingCloudRegions.Awake. Comment out the line: StartCoroutine(PingAllRegions());
    Make sure to not use ConnectToBestCloudServer as well.

    I will check if I can add some option to disable this.
  • Thank you.
    We will try this.
  • Tobias
    Options
    I added the option by now but it's not released yet. PUN v1.25 will have it...
  • Petr
    Options
    Cool! Thank you a lot.

    I made changes that you described.
    All is ok now.
    There are small jerks at first launch (when there is no Internet), but this is much better than long freezes of interface.