Skip to content

fix(headless-client): don't fuse futures outside of the loop#7287

Merged
thomaseizinger merged 2 commits intomainfrom
fix/recreate-signal
Nov 8, 2024
Merged

fix(headless-client): don't fuse futures outside of the loop#7287
thomaseizinger merged 2 commits intomainfrom
fix/recreate-signal

Conversation

@thomaseizinger
Copy link
Member

When waiting on multiple futures concurrently within a loop, it is important that they all get re-created whenever one of them resolves. Currently, due to the .fuse call, the SIGHUP signal can only be sent once and future signals get ignored.

As a more general fix, I swapped the futures::select! macro to the tokio::select! macro which allows referencing these futures without pinning and fusing. Ideally, we'd not use any of these macros here and write our own eventloop but that is a larger refactoring.

@vercel
Copy link

vercel bot commented Nov 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
firezone ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 8, 2024 4:23am

Copy link
Member

@jamilbk jamilbk left a comment

Choose a reason for hiding this comment

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

Good find

@thomaseizinger thomaseizinger added this pull request to the merge queue Nov 8, 2024
Merged via the queue into main with commit cdd3e4d Nov 8, 2024
@thomaseizinger thomaseizinger deleted the fix/recreate-signal branch November 8, 2024 05:16
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