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

fix: waitOn and fetch IPv4&v6 instead of localhost #704

Merged
merged 3 commits into from
Jun 6, 2023

Conversation

cjk7989
Copy link
Contributor

@cjk7989 cjk7989 commented May 31, 2023

Fix: issue #663.
Use 127.0.0.1 and [::1] for waitOn() and fetch() when using "swa start src --api-location api" with the default --host=localhost. Then check if any of them successes. This is because localhost may not be resolved to ipv4 on some systems.

Copy link
Member

@sinedied sinedied left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an issue using await in a for loop, but looks good otherwise

src/core/utils/net.ts Outdated Show resolved Hide resolved
src/msha/handlers/function.handler.ts Outdated Show resolved Hide resolved
@cjk7989 cjk7989 requested a review from sinedied June 1, 2023 09:22
Copy link
Member

@sinedied sinedied left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sent suggestion for small typo, otherwise LGTM 👍

});

try {
const avaliableUrl = await Promise.any(promises);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const avaliableUrl = await Promise.any(promises);
const availableUrl = await Promise.any(promises);

Small typo

@cjk7989 cjk7989 merged commit 863fa3b into main Jun 6, 2023
@cjk7989 cjk7989 deleted the wait-onAndFetchLocalhost branch June 6, 2023 05:04
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