mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 01:03:08 -07:00
- BUGFIX: Catching DHT exception in case there is a problem
This commit is contained in:
parent
b66be5b64b
commit
8ea34135e4
5 changed files with 23 additions and 12 deletions
|
@ -884,11 +884,14 @@ void GUI::configureSession(bool deleteOptions) {
|
|||
BTSession->setMaxUploadsPerTorrent(options->getMaxUploadsPerTorrent());
|
||||
// * DHT
|
||||
if(options->isDHTEnabled()) {
|
||||
BTSession->enableDHT(true);
|
||||
downloadingTorrentTab->setInfoBar(tr("DHT support [ON], port: %1").arg(new_listenPort), QString::fromUtf8("blue"));
|
||||
// Set DHT Port
|
||||
BTSession->setDHTPort(new_listenPort);
|
||||
}else{
|
||||
if(BTSession->enableDHT(true)) {
|
||||
downloadingTorrentTab->setInfoBar(tr("DHT support [ON], port: %1").arg(new_listenPort), QString::fromUtf8("blue"));
|
||||
} else {
|
||||
downloadingTorrentTab->setInfoBar(tr("DHT support [OFF]"), QString::fromUtf8("red"));
|
||||
}
|
||||
} else {
|
||||
BTSession->enableDHT(false);
|
||||
downloadingTorrentTab->setInfoBar(tr("DHT support [OFF]"), QString::fromUtf8("blue"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue