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(network/worker): forget response token to prevent recursion on drop #149

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

Erigara
Copy link
Contributor

@Erigara Erigara commented Jan 14, 2025

It was observed that in case of panic on other side of network actor, response token ended up in endless recursion due Drop implementation.

@sargarass
Copy link
Contributor

I'm not sure this PR fixes the issue. We probably don't want to re-enter the drop with the same ResponseToken twice. This means we either check all possible outcomes and manually handle them with forget (which is error-prone and potentially dangerous in this case too and down the line), or we could use some kind of bitflags to mark tokens as responded.

@Erigara
Copy link
Contributor Author

Erigara commented Jan 16, 2025

Ok, i agree, setting some kind of flag would be more robust approach in this case.

@Erigara Erigara force-pushed the fix_network_worker_recursion branch from 98537b5 to 1a31a39 Compare January 20, 2025 18:37
@Erigara Erigara force-pushed the fix_network_worker_recursion branch from 1a31a39 to 24ea3e2 Compare January 20, 2025 18:39
@Erigara Erigara requested a review from loyd January 21, 2025 08:37
@loyd loyd merged commit 26a6d56 into elfo-rs:master Jan 22, 2025
7 checks passed
loyd added a commit that referenced this pull request Jan 23, 2025
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.

3 participants