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

libtorrent: Move resolver callback to connection manager #40

Merged
merged 5 commits into from
Jul 20, 2024
Merged

Conversation

stickz
Copy link
Owner

@stickz stickz commented Jul 20, 2024

We need to move the resolver callback up to the connection manager, so it's always accessible by UDNS. Otherwise, we crash.

This commit moves the UDNS resolver callback to the connection manager so it's always valid for the life of the query. It fixes a crash with UDNS.
We can't send UDP tracker object references through std:bind() because it copies them, resulting in memory address errors. So we need to store them higher up in the connection manager, where they are always valid.
We need to move the resolver callback up to the connection manager, so it's always accessible by UDNS. Otherwise, we crash.
@stickz stickz merged commit 5517bef into master Jul 20, 2024
2 checks passed
@stickz stickz deleted the udns-fix branch July 20, 2024 02:05
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.

1 participant