Closed e1y4s closed 1 month ago
@arvidn One more question: why don't you want to connect to peers while checking files (m_state == torrent_status::checking_files)?
thanks! looks good. It's kind of subtle, it might warrant a comment in the code explaining this carve-out. Would you mind adding an entry to the
Changelog
as well?
Thanks! Just added both. Let me know if anything else needs adjustment.
@joriscarrier
why don't you want to connect to peers while checking files (m_state == torrent_status::checking_files)?
Although it would be possible to check files while participating in the swarm it's more complicated and isn't supported by the torrent/piece-picker (and possibly not the disk I/O system). The unchecked pieces would need a new state to indicate that they can't be picked for downloading, even though their priority may be non-zero.
For historical reasons, checking has been a separate state where we, essentially, don't have a piece picker.
@e1y4s thanks!
When adding a torrent with peers, if metadata is already available and the torrent is in
checking_resume_data
state,torrent::want_peers()
currently returnsfalse
. This behavior preventstorrent::do_connect_boost()
from initiating connections, leading to delays.This modification addresses the issue by permitting peer connections in this scenario when
no_verify_files
flag is set.