Skip to content

fix: Allow Relay hosts/servers on WebGL #2321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 24, 2022

Conversation

simon-lemay-unity
Copy link
Contributor

The check in place cast too wide a net, which resulted in an exception being thrown if starting a host on WebGL even if using the Relay service, which is a valid use case. What we want to prevent is trying to start a host/server on WebGL builds when using direct IP connections, because browsers can't act as servers. But when using Relay, the browser is not acting as a server, it's always acting as a client to the Relay server.

This PR addresses that by only throwing the exception when not using Relay.

Changelog

  • Fixed: Fixed an issue in UnityTransport where an exception would be thrown if starting a Relay host/server on WebGL. This exception should only be thrown if using direct connections (where WebGL can't act as a host/server).

Testing and Documentation

  • No tests have been added.
  • No documentation changes or additions were necessary.

@simon-lemay-unity simon-lemay-unity requested review from a team as code owners November 22, 2022 16:32
@simon-lemay-unity simon-lemay-unity enabled auto-merge (squash) November 24, 2022 15:16
@simon-lemay-unity simon-lemay-unity merged commit d9ab3a7 into develop Nov 24, 2022
@simon-lemay-unity simon-lemay-unity deleted the fix/allow-webgl-relay-server branch November 24, 2022 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants