mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-03-13 05:41:17 +00:00
Merge pull request #12430 from rwasef1830/add-outgoing-interfaces
Fix outgoing interfaces not getting assigned in case addr is not null.
This commit is contained in:
commit
f58f425175
@ -1533,10 +1533,11 @@ void Session::configureNetworkInterfaces(lt::settings_pack &settingsPack)
|
||||
for (const QString &ip : asConst(getListeningIPs())) {
|
||||
const QHostAddress addr {ip};
|
||||
if (!addr.isNull()) {
|
||||
endpoints << ((addr.protocol() == QAbstractSocket::IPv6Protocol)
|
||||
const QString ip = ((addr.protocol() == QAbstractSocket::IPv6Protocol)
|
||||
? ('[' + Utils::Net::canonicalIPv6Addr(addr).toString() + ']')
|
||||
: addr.toString())
|
||||
+ portString;
|
||||
: addr.toString());
|
||||
endpoints << (ip + portString);
|
||||
outgoingInterfaces << ip;
|
||||
}
|
||||
else {
|
||||
// ip holds an interface name
|
||||
|
Loading…
x
Reference in New Issue
Block a user