Skip to content
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

refactor: make sure that port '80' and '443' are correctly passed through #631

Merged
merged 1 commit into from
Feb 13, 2022
Merged

refactor: make sure that port '80' and '443' are correctly passed through #631

merged 1 commit into from
Feb 13, 2022

Conversation

pataar
Copy link
Member

@pataar pataar commented Feb 13, 2022

This fixes the problem described in #594 (review).

For me, Mainsail has been trying to connect to moonraker on port 0 (rather than port 80) ever since this PR has been merged. The issue is that in the case Mainsail falls back onto window.port.location, if the browser has loaded mainsail via HTTP on port 80, said variable will be an empty string (as per MDN). Number('') yields 0, which makes Mainsail connect on the wrong port. Removing the cast to number fixes the issue.

@meteyou meteyou merged commit fd22cc2 into mainsail-crew:develop Feb 13, 2022
@pataar pataar deleted the fix/port_detection branch February 13, 2022 17:41
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.

2 participants