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

(iroh-net) Manage tasks for Discovery::publish in MagicEndpoint #2066

Open
Frando opened this issue Mar 11, 2024 · 0 comments
Open

(iroh-net) Manage tasks for Discovery::publish in MagicEndpoint #2066

Frando opened this issue Mar 11, 2024 · 0 comments

Comments

@Frando
Copy link
Member

Frando commented Mar 11, 2024

Discovery::publish is currently a one-off sync function calls and async publish impls are expected to start their own task with tokio::task::spawn. This means those tasks cannot be aborted when the magic endpoint shuts down.
Instead we should either pass a cancellation token or a JoinSet to spawn tasks into.

See also this discussion: #2056 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant