mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-27 11:49:01 +03:00
Don't rebind listen port on 'network configuration changed' signal when we listen on any address. Closes #4139.
This commit is contained in:
parent
ac3b01e02e
commit
86dba7bd21
1 changed files with 3 additions and 1 deletions
|
@ -1433,8 +1433,10 @@ void Session::networkOnlineStateChanged(const bool online)
|
|||
void Session::networkConfigurationChange(const QNetworkConfiguration& cfg)
|
||||
{
|
||||
const QString configuredInterfaceName = Preferences::instance()->getNetworkInterface();
|
||||
if (configuredInterfaceName.isEmpty())
|
||||
return;
|
||||
const QString changedInterface = cfg.name();
|
||||
if (configuredInterfaceName.isEmpty() || configuredInterfaceName == changedInterface) {
|
||||
if (configuredInterfaceName == changedInterface) {
|
||||
Logger::instance()->addMessage(tr("Network configuration of %1 has changed, refreshing session binding", "e.g: Network configuration of tun0 has changed, refreshing session binding").arg(changedInterface), Log::INFO);
|
||||
setListeningPort();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue