allow torrents to keep running when they encounter an error (such as disk full) but still report the error in the torrent's error string
This commit is contained in:
parent
ddd9dd4b09
commit
6e23b9f5a6
|
@ -1149,9 +1149,8 @@ namespace libtorrent
|
|||
return;
|
||||
}
|
||||
|
||||
if ((t->is_paused() && (!t->is_auto_managed()
|
||||
if (t->is_paused() && (!t->is_auto_managed()
|
||||
|| !m_ses.m_settings.incoming_starts_queued_torrents))
|
||||
|| t->has_error())
|
||||
{
|
||||
// paused torrents will not accept
|
||||
// incoming connections unless they are auto managed
|
||||
|
|
|
@ -2677,7 +2677,7 @@ namespace aux {
|
|||
{
|
||||
torrent& t = *i->second;
|
||||
TORRENT_ASSERT(!t.is_aborted());
|
||||
if (t.statistics().upload_rate() > t.upload_limit() * 9 / 10)
|
||||
if (t.statistics().upload_rate() * 11 / 10 > t.upload_limit())
|
||||
++congested_torrents;
|
||||
else
|
||||
++uncongested_torrents;
|
||||
|
|
|
@ -1054,6 +1054,9 @@ namespace libtorrent
|
|||
if (alerts().should_post<file_error_alert>())
|
||||
alerts().post_alert(file_error_alert(j.error_file, get_handle(), j.error));
|
||||
|
||||
// put the torrent in an error-state
|
||||
set_error(j.error, j.error_file);
|
||||
|
||||
if (j.action == disk_io_job::write)
|
||||
{
|
||||
// if we failed to write, stop downloading and just
|
||||
|
@ -1067,8 +1070,7 @@ namespace libtorrent
|
|||
return;
|
||||
}
|
||||
|
||||
// put the torrent in an error-state
|
||||
set_error(j.error, j.error_file);
|
||||
// if the error appears to be more serious than a full disk, just pause the torrent
|
||||
pause();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue