Skip to content

Hardcoded default port numbers prevent concurrent execution - consider testing if port is in use #2470

Closed
@garikAsplund

Description

@garikAsplund

I had a couple projects open at the same time and noticed that the default ports are hardcoded and thus collide.

Screenshot 2024-04-24 at 9 18 38 PM Screenshot 2024-04-24 at 9 18 28 PM

I'm using spin 2.4.2.

I'd be willing to give this a shot tomorrow. The issue is in crates/trigger-http/src/lib.rs.

I propose amending the serve and serve_tls functions to go through ~10 ports if the one listening is in use. This would not just work for default_value but also if the "--listen ADDRESS" is also in use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions