mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
Fix outgoing interface is not getting assigned
Assignment was missing in main branch of condition statement. Closes https://github.com/qbittorrent/qBittorrent/issues/12421
This commit is contained in:
parent
476707cc80
commit
075245c915
1 changed files with 4 additions and 3 deletions
|
@ -1533,10 +1533,11 @@ void Session::configureNetworkInterfaces(lt::settings_pack &settingsPack)
|
||||||
for (const QString &ip : asConst(getListeningIPs())) {
|
for (const QString &ip : asConst(getListeningIPs())) {
|
||||||
const QHostAddress addr {ip};
|
const QHostAddress addr {ip};
|
||||||
if (!addr.isNull()) {
|
if (!addr.isNull()) {
|
||||||
endpoints << ((addr.protocol() == QAbstractSocket::IPv6Protocol)
|
const QString ip = ((addr.protocol() == QAbstractSocket::IPv6Protocol)
|
||||||
? ('[' + Utils::Net::canonicalIPv6Addr(addr).toString() + ']')
|
? ('[' + Utils::Net::canonicalIPv6Addr(addr).toString() + ']')
|
||||||
: addr.toString())
|
: addr.toString());
|
||||||
+ portString;
|
endpoints << (ip + portString);
|
||||||
|
outgoingInterfaces << ip;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// ip holds an interface name
|
// ip holds an interface name
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue