-
Notifications
You must be signed in to change notification settings - Fork 1.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
checking if we build torrent file #4723
Conversation
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.
We can’t just ignore it, because we need seed this files for other peers
It happening because I moved AddSegment after Proto2InfoHas. Let’s try call Proto2InfoHash only if TorrentHash is not nil.
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.
Looks great, but let’s avoid empty hashes.
Sometimes we don't need to build torrent files , which return nil inside of
BuildTorrentFileIfNeed
. This means that sometimes we try to convert a Proto file to an info hash, but we don't have one throwing a nil pointer.