mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-01-06 15:04:34 +08:00
Merge pull request #11227 from Chocobo1/alert
Handle "alerts dropped" alert from libtorrent
This commit is contained in:
commit
12c127b482
@ -3902,6 +3902,11 @@ void Session::handleAlert(const lt::alert *a)
|
|||||||
case lt::external_ip_alert::alert_type:
|
case lt::external_ip_alert::alert_type:
|
||||||
handleExternalIPAlert(static_cast<const lt::external_ip_alert*>(a));
|
handleExternalIPAlert(static_cast<const lt::external_ip_alert*>(a));
|
||||||
break;
|
break;
|
||||||
|
#if (LIBTORRENT_VERSION_NUM >= 10200)
|
||||||
|
case lt::alerts_dropped_alert::alert_type:
|
||||||
|
handleAlertsDroppedAlert(static_cast<const lt::alerts_dropped_alert *>(a));
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (const std::exception &exc) {
|
catch (const std::exception &exc) {
|
||||||
@ -4365,6 +4370,14 @@ void Session::handleSessionStatsAlert(const lt::session_stats_alert *p)
|
|||||||
emit statsUpdated();
|
emit statsUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (LIBTORRENT_VERSION_NUM >= 10200)
|
||||||
|
void Session::handleAlertsDroppedAlert(const lt::alerts_dropped_alert *p) const
|
||||||
|
{
|
||||||
|
LogMsg(tr("Error: Internal alert queue full and alerts were dropped, you might see degraded performance. Dropped alert types: %1. Message: %2")
|
||||||
|
.arg(QString::fromStdString(p->dropped_alerts.to_string()), QString::fromStdString(p->message())), Log::CRITICAL);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void Session::handleStateUpdateAlert(const lt::state_update_alert *p)
|
void Session::handleStateUpdateAlert(const lt::state_update_alert *p)
|
||||||
{
|
{
|
||||||
QVector<BitTorrent::TorrentHandle *> updatedTorrents;
|
QVector<BitTorrent::TorrentHandle *> updatedTorrents;
|
||||||
|
@ -562,6 +562,9 @@ namespace BitTorrent
|
|||||||
void handleListenFailedAlert(const lt::listen_failed_alert *p);
|
void handleListenFailedAlert(const lt::listen_failed_alert *p);
|
||||||
void handleExternalIPAlert(const lt::external_ip_alert *p);
|
void handleExternalIPAlert(const lt::external_ip_alert *p);
|
||||||
void handleSessionStatsAlert(const lt::session_stats_alert *p);
|
void handleSessionStatsAlert(const lt::session_stats_alert *p);
|
||||||
|
#if (LIBTORRENT_VERSION_NUM >= 10200)
|
||||||
|
void handleAlertsDroppedAlert(const lt::alerts_dropped_alert *p) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
void createTorrentHandle(const lt::torrent_handle &nativeHandle);
|
void createTorrentHandle(const lt::torrent_handle &nativeHandle);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user