Interface may be null if there are no suitable network interfaces.

This commit is contained in:
akwizgran
2012-11-13 13:52:08 +00:00
parent eb4e7da354
commit 29751dcf6f

View File

@@ -120,6 +120,7 @@ class LanTcpPlugin extends TcpPlugin {
MulticastSocket ms = null;
try {
InetAddress iface = chooseInterface();
if(iface == null) return null;
ms = new MulticastSocket(mcast.getPort());
ms.setInterface(iface);
ms.joinGroup(mcast.getAddress());