mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-03-23 04:28:36 -04:00
Improve multicast support for multi-homed Windows machines
This commit is contained in:
parent
a4d496cdb0
commit
5c3f373c96
@ -121,6 +121,7 @@ void MessageServer::impl::join_multicast_group ()
|
||||
#endif
|
||||
)
|
||||
{
|
||||
auto mcast_iface = multicastInterface ();
|
||||
if (IPv4Protocol == multicast_group_address_.protocol ()
|
||||
&& IPv4Protocol != localAddress ().protocol ())
|
||||
{
|
||||
@ -132,6 +133,11 @@ void MessageServer::impl::join_multicast_group ()
|
||||
{
|
||||
if (QNetworkInterface::CanMulticast & interface.flags ())
|
||||
{
|
||||
// Windows requires outgoing interface to match
|
||||
// interface to be joined while joining, at least for
|
||||
// IPv4 it seems to
|
||||
setMulticastInterface (interface);
|
||||
|
||||
joined |= joinMulticastGroup (multicast_group_address_, interface);
|
||||
}
|
||||
}
|
||||
@ -139,6 +145,7 @@ void MessageServer::impl::join_multicast_group ()
|
||||
{
|
||||
multicast_group_address_.clear ();
|
||||
}
|
||||
setMulticastInterface (mcast_iface);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user