fixed minor error handling logging and assert issue in disk io thread
This commit is contained in:
parent
ba5b0638c0
commit
27f84d1618
|
@ -2344,7 +2344,7 @@ namespace libtorrent
|
||||||
ret = piece_manager::fatal_disk_error;
|
ret = piece_manager::fatal_disk_error;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
TORRENT_ASSERT(ret != -2 || !j.str.empty());
|
TORRENT_ASSERT(ret != -2 || j.error);
|
||||||
|
|
||||||
// if the check is not done, add it at the end of the job queue
|
// if the check is not done, add it at the end of the job queue
|
||||||
if (ret == piece_manager::need_full_check)
|
if (ret == piece_manager::need_full_check)
|
||||||
|
@ -2400,7 +2400,7 @@ namespace libtorrent
|
||||||
#ifndef BOOST_NO_EXCEPTIONS
|
#ifndef BOOST_NO_EXCEPTIONS
|
||||||
try {
|
try {
|
||||||
#endif
|
#endif
|
||||||
TORRENT_ASSERT(ret != -2 || !j.str.empty()
|
TORRENT_ASSERT(ret != -2 || j.error
|
||||||
|| j.action == disk_io_job::hash);
|
|| j.action == disk_io_job::hash);
|
||||||
#if TORRENT_DISK_STATS
|
#if TORRENT_DISK_STATS
|
||||||
if ((j.action == disk_io_job::read || j.action == disk_io_job::read_and_hash)
|
if ((j.action == disk_io_job::read || j.action == disk_io_job::read_and_hash)
|
||||||
|
|
|
@ -1298,7 +1298,7 @@ namespace libtorrent
|
||||||
}
|
}
|
||||||
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
|
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
|
||||||
(*m_ses.m_logger) << time_now_string() << ": fatal disk error ["
|
(*m_ses.m_logger) << time_now_string() << ": fatal disk error ["
|
||||||
" error: " << j.str <<
|
" error: " << j.error.message() <<
|
||||||
" torrent: " << torrent_file().name() <<
|
" torrent: " << torrent_file().name() <<
|
||||||
" ]\n";
|
" ]\n";
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue