Commit Graph

1457 Commits

Author SHA1 Message Date
Arvid Norberg e1eb12e60f ssl listen port fix and improved tracker announce logging 2018-10-29 18:38:14 +01:00
Arvid Norberg 2647ca2412 add option to ignore min-interval from tracker, when force-reannouncing a tracker 2018-09-04 08:46:24 +02:00
arvidn 2e313de898 remove unused member variables in torrent object 2018-08-29 15:01:40 +02:00
arvidn 6d2541f131 improve connect-boost feature, to make new torrents quickly connect peers 2018-08-09 20:12:56 +02:00
Arvid Norberg 0a5b3c1bb0 update documentation for save_resume_data() and stop_when_ready() 2018-08-09 00:57:21 +02:00
arvidn 19df645012 apply piece priorities immediately, even though file priority updares are async. save both file- and piece priorities in fast resume. when loading, apply file prios first, then piece prios 2018-07-29 21:53:01 +02:00
Arvid Norberg 5bb5ba145f fix exporting files from partfile while seeding 2018-07-18 10:56:24 +02:00
arvidn d2d35b69fd raise priority of cache_flushed_alert and post it unconditionally when triggered explicily by the client 2018-07-08 18:23:44 +02:00
Arvid Norberg b60912569f back-port resume data validation fixes 2018-07-08 17:31:29 +02:00
arvidn b5cd959dd1 bump the minimum number of hash jobs per thread from 2 to 4 2018-07-07 18:02:24 +02:00
arvidn 3249b70cbd fix recent patch to support setting file priorities on torrents that don't have metadata yet 2018-07-07 11:34:11 +02:00
d-komarov 6d5a6f05ad Fix torrent files prioritization (#3133)
After setting file priority, any subsequent attempt to set different priorities will fail if there is a `file_priority` job running in in disk thread. This happens because `torrent::m_file_priority` is being updated before adding disk thread job. The problem is gone if the file priority vector owned by the torrent object, is modified in the `torrent::on_file_priority` callback, when disk job finishes.
2018-07-04 08:16:33 +02:00
Steven Siloti b7f230316c set the minimum number of checking jobs based on the number of hasher threads
To effectively mask the latency of generating more hash jobs there need to be
at least two jobs in-flight for each hasher thread.
2018-06-23 23:10:55 +02:00
arvidn c55bc7dd42 improve error handling of failing to change file priority 2018-05-31 00:47:17 +02:00
Steven Siloti 54f00ce09d don't change state to downloading if the torrent is finished
Move the transition to downloading after the torrent has been checked
for being finished. This prevents a spurious state_changed_alert when
adding a torrent which is already completed.

Also move the posting of the torrent_checked_alert to maintain the
historical ordering of that alert with respect to the transition out of
checking_resume_data.
2018-05-20 08:45:24 +02:00
Steven Siloti 243353a144 account for partially downloaded pieces when announcing as a seed 2018-05-13 22:35:04 +02:00
arvidn 3ede0b9c20 fix last_upload, last_download and last_scrape to be reported accurately and saved/restored in resume data 2018-04-22 06:14:22 -04:00
arvidn aaf9304a3b update year in copyright header 2018-04-09 09:04:33 +02:00
Fernando Rodriguez 9d83da110b Delay hash_failed_alert until on_piece_sync()
Delay the hash_failed_alert until after synchronizing with the IO thread
so that it can be used to synchronize piece progress.
2018-04-07 15:59:40 +02:00
d_komarov 1c867a5026 Changing file priorities while checking interrupts checking.
Also, if the last file has zero priority, checking is interrupted prematurely.
2018-03-26 02:59:10 +02:00
arvidn 02a01fa22e fix issue where the current tracker would be skipped for the next tracker in the same tier 2018-03-25 14:40:38 +02:00
arvidn 82f87b0655 remove redundant check in tracker announce. This is checked in http_tracker_connection 2018-03-21 23:38:10 +01:00
arvidn a06e4f696b track whether a file is eligible for using the partfile on a per-file basis. This is intended to improve backwards compatibility, to better support resuming files downloaded with older versions of libtorrent 2018-03-11 12:52:56 +01:00
arvidn 05f7a95604 fix reporting &redundant= in tracker announces 2018-03-08 02:11:46 +01:00
arvidn 77181c1469 fix issue when receiving a torrent with 0-sized padfiles as magnet link 2018-02-09 17:41:30 +01:00
arvidn 01c41fadcf fix torrent_status::next_announce 2018-01-29 15:08:18 +01:00
arvidn ca3ea591df fix pad-file scalability issue 2018-01-29 03:00:37 +01:00
d-komarov fa03cbea9b Revise torrent state update
* Remove unused m_in_state_updates
* Update m_state_subscription comments
2018-01-27 09:17:40 +01:00
arvidn efd096d879 use unique peer_ids per connection 2018-01-23 16:40:16 +01:00
arvidn 178281e1c5 make torrent_handler::set_priority() to use peer_classes 2017-12-18 00:56:44 +01:00
arvidn d52763805c back-port the tracker timeout test from master 2017-12-16 13:54:15 +01:00
arvidn d1a63cd781 fix build against boost-1.66, specifically the boost.asio changes 2017-12-15 11:29:53 +01:00
arvidn b00b3184c0 some minor i2p cleanups 2017-12-08 09:57:21 +01:00
arvidn f81a20a035 fix loading resume data when in seed mode 2017-12-03 23:43:55 +01:00
arvidn 5e7666526e fix IPv6 tracker announce issue 2017-11-23 10:11:59 +01:00
Steven Siloti dc612b6423 keep updating aux::time_now() while there are announces
This fixes an infinite loop when an announce during shutown fails and
aux::time_now() has fallen behind clock_type::now() by more than the
delay calculated in announce_entry::failed(). If this happens,
announce_entry::can_announce() can forever return true when called from
torrent::announce_with_tracker() because that function uses
clock_type::now().

Also change torrent::announce_with_tracker() to use aux::time_now() just
for consistency with the reset of the announce related functions.
2017-10-26 23:42:35 +02:00
Steven Siloti 2b72a7321a send one last state update when a paused torrent's rates reach zero (#2436) 2017-10-11 23:10:40 +02:00
arvidn cdd9f91999 fix leak of torrent_peer objecs (entries in peer_list) 2017-10-07 11:43:42 +02:00
arvidn 4e1c5738a2 back-port openssl API compat patch from master 2017-10-07 01:10:41 +02:00
arvidn 99b19366a9 fix leak of peer_class objects (when setting per-torrent rate limits) 2017-10-03 17:32:49 +02:00
arvidn ddc8711dbe fix issue where peers could be disconnected while iterating over the peer list in the torrent. Specifically while marking peers as not-interesting 2017-09-21 07:26:13 -07:00
Steven Siloti 52ccad23b9 read_piece: handle failure to allocate piece buffer 2017-08-29 12:24:17 +02:00
arvidn fe37884bc6 fix IPv6 tracker support by performing the second announce in more cases 2017-08-19 18:56:51 +02:00
Steven Siloti 50c2aee8ec don't create web seed connections if the torrent is upload only
The fix in 9a63d4696e was imcomplete.
It turns out disconnect_if_redundant decrements the connection count
which unballances the count if we do end up disconnecting the peer.

This change avoids the problem by checking if the torrent is
upload only much sooner, before the connection object is even created.
We still do a redundancy check just-in-case, but it is not expected to
trigger.
2017-08-11 08:16:00 +02:00
arvidn 2b98951ace assert that trackers are not announced to while checking files 2017-08-06 20:21:03 +02:00
arvidn 1f3730fa5a fix force-recheck issue (new files would not be picked up) 2017-08-06 09:49:51 +02:00
arvidn cedd468300 backport fix to clearing of piece picker in suggest_read_cache mode 2017-07-22 00:00:14 -07:00
arvidn cc30434c52 fix inconsistency in file_priorities and override_resume_data behavior. file_priorities are not subject to the override_resume_data flag 2017-07-12 15:36:55 -07:00
d-komarov 11d6a00bec fix storage destruction order issue (#2138)
back-ported from b553cb32f7
2017-07-10 21:35:34 -07:00
arvidn 506950001d fix regression where paused torrents could not have their queue position changed 2017-06-27 12:37:08 -04:00