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

allow connections while checking resume data if no_verify_files flag is set #7754

Merged
merged 1 commit into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

2.0.11 not released

* allow boost connect while checking resume data if no_verify_files flag is set
* fix BEP-40 peer priority for IPv6
* limit piece size in torrent creator
* fix file pre-allocation when changing file priority (HanabishiRecca)
Expand Down
6 changes: 5 additions & 1 deletion src/torrent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Copyright (c) 2020, Paul-Louis Ageneau
Copyright (c) 2021, AdvenT
Copyright (c) 2021, Joris CARRIER
Copyright (c) 2021, thrnz
Copyright (c) 2024, Elyas EL IDRISSI
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -8160,8 +8161,11 @@ namespace {
// if we're paused, obviously we're not connecting to peers
if (is_paused() || m_abort || m_graceful_pause_mode) return false;

// if metadata are valid and we are either checking files or checking resume data without no_verify_files flag,
// we don't want peers
if ((m_state == torrent_status::checking_files
|| m_state == torrent_status::checking_resume_data)
|| (m_state == torrent_status::checking_resume_data
&& !(m_add_torrent_params && m_add_torrent_params->flags & torrent_flags::no_verify_files)))
&& valid_metadata())
return false;

Expand Down
Loading