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

[core] When address is already in use, local server blocks with swift task continuation misused #470

Closed
sebsto opened this issue Jan 22, 2025 · 0 comments · Fixed by #471
Assignees
Labels
good first issue Good for newcomers kind/bug Feature doesn't work as expected. semver/none No version bump required. size/S Small task. (A couple of hours of work.)

Comments

@sebsto
Copy link
Contributor

sebsto commented Jan 22, 2025

Steps to reproduce:

  • Start the local server for one of the examples
  • From another terminal, start another local server.

Current behavior:
The second server blocks with message SWIFT TASK CONTINUATION MISUSE: withLocalServer(invocationEndpoint:_:) leaked its continuation!

Desired behavior:
Local server fails to start with an error like bind(descriptor:ptr:bytes:): Address already in use (errno: 48)

Root cause:
This block of code must be wrapped into a do catch block and call continuation.resume(throwing: error) when an error is throw.

@sebsto sebsto added the kind/bug Feature doesn't work as expected. label Jan 22, 2025
@sebsto sebsto self-assigned this Jan 22, 2025
@sebsto sebsto added good first issue Good for newcomers semver/none No version bump required. size/S Small task. (A couple of hours of work.) labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers kind/bug Feature doesn't work as expected. semver/none No version bump required. size/S Small task. (A couple of hours of work.)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant