-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Tracker is errored only if all local endpoints fail #11733
Tracker is errored only if all local endpoints fail #11733
Conversation
d0e5e16
to
77c3c72
Compare
77c3c72
to
10904d1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, always found out something after pressing the approve button :\
m_session->handleTorrentTrackerError(this, trackerUrl); | ||
// Starting with libtorrent 1.2.x each tracker has multiple local endpoints from which | ||
// an announce is attempted. Some endpoints might succeed while others might fail. | ||
// Emit the signal only if all endpoints have failed. TrackerEntry::isWorking() returns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment of how TrackerEntry::isWorking()
works should be documented at trackerentry.cpp, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know. I did it here to help any reader on why I seem to check only once but I say "multiple endpoints" (in the comment).
10904d1
to
0cf3d25
Compare
Ok, I resolved the issue with isWorking() in another way. Take another look. |
0cf3d25
to
bf363d6
Compare
bf363d6
to
02a0271
Compare
@sledgehammer999 I tested build you posted in related issue and it doesn't work well. It fixes the issue described, but when a tracker returns error message, this error message is not shown, at least not always. Looking at the code it is quite clear why this happens. I'm yet to build and debug this, but let me explain what I think happens. Quick recap so we are on the same page, correct me if I mixed up something.
Now this logic is fine, but look at the line here I have a case, where tracker returns "unregistered torrent", but the message in qbt is blank (works fine with 4.2.0). Probably because if was overwritten, by the error on the other endpoint, which failed to connect of smth. Anyhow, I would need to debug this to tell more, but maybe you will fix it sooner :) |
I couldn't reproduce this. Local endpoints error out first..so the last message to overwrite would be the reachable one. |
This condition doesn't seem to be guaranteed, does it? |
You're right. It's not guaranteed. However you can't store multiple msgs for each endpoint and display multiple msgs. That would be unreasonable. |
Closes #11691