Skip to content

Commit

Permalink
allow connections while checking resume data if no_verify_files flag …
Browse files Browse the repository at this point in the history
…is set
  • Loading branch information
Elyas EL IDRISSI authored and arvidn committed Oct 20, 2024
1 parent b90ed66 commit 911011e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit 911011e

Please sign in to comment.