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

checking if we build torrent file #4723

Merged
merged 13 commits into from
Jul 16, 2022
Merged

checking if we build torrent file #4723

merged 13 commits into from
Jul 16, 2022

Conversation

enriavil1
Copy link
Contributor

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.

Copy link
Collaborator

@AskAlexSharov AskAlexSharov left a 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.

Copy link
Collaborator

@AskAlexSharov AskAlexSharov left a 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.

cmd/downloader/downloader/downloader_grpc_server.go Outdated Show resolved Hide resolved
cmd/downloader/downloader/downloader_grpc_server.go Outdated Show resolved Hide resolved
cmd/downloader/downloader/downloader_grpc_server.go Outdated Show resolved Hide resolved
@enriavil1 enriavil1 merged commit e044014 into devel Jul 16, 2022
@enriavil1 enriavil1 deleted the check-torrent branch July 16, 2022 08:06
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.

None yet

2 participants