decentraland / explorer

🌎 Explore Decentraland from a web browser
https://explorer.decentraland.org
Apache License 2.0
78 stars 39 forks source link

fix: Connect to the next best realm if the Explore JumpIn fails (Kernel side) #2477

Closed sandrade-dcl closed 3 years ago

sandrade-dcl commented 3 years ago

What does this PR fix?

This PR is the Kernel side for the Fix https://github.com/decentraland/unity-renderer/issues/244. It has to be merged with the unity side (here).

BEFORE this change, when we jumped in to a scene from the "Explore & Play" window, the system tried to teleport us to a specific realm (choosed by the own Explore feature). When the joinning to this realm failed (because of the server down, a full realm, etc.), the feature was broken and we were not able to do the teleport.

NOW, after we try to jump in to a scene from the Explore, if the joinning to the specific realm fails, the system will automatically try to find the next better realm to go (we prioritize the list of available realms by number of users in each realm). Even if it is not be able to find any realm to go, it will finally use our current realm to do the teleport. In this way, the users will always be able to jump to the scene they wanted (although it has to be in another realm).

How to test the changes?

  1. Go to: https://play.decentraland.zone/branch/fix/Connect-to-the-next-best-realm-if-the-jump-in-fails-kernel-side/index.html?renderer=urn:decentraland:off-chain:renderer-artifacts:fix/Connect-to-the-next-best-realm-if-the-jump-in-fails-unity-side&ENV=org
  2. Open the Explore window.
  3. Select different scenes to jump in.

Our Code Review Standards

https://github.com/decentraland/unity-renderer/blob/master/docs/code-review-standards.md

github-actions[bot] commented 3 years ago

After the CI passes: