Suppress multiple I/O errors for the same torrent

When a file error happens libtorrent spews a ton of `file_error_alert`
which result in log floods and notification balloon floods. The later
might render the program inaccessible because the constant
notifications prevent the user from interacting with the tray icon.

Closes #8934
This commit is contained in:
sledgehammer999
2018-05-21 01:09:58 +03:00
parent 9df6ecafd0
commit b9546ccd4c
2 changed files with 18 additions and 4 deletions

View File

@@ -761,6 +761,10 @@ namespace BitTorrent
QStringMap m_categories;
QSet<QString> m_tags;
// I/O errored torrents
QSet<InfoHash> m_recentErroredTorrents;
QTimer *m_recentErroredTorrentsTimer;
#if LIBTORRENT_VERSION_NUM < 10100
QMutex m_alertsMutex;
QWaitCondition m_alertsWaitCondition;