# HG changeset patch # User oc # Date 1417421196 -32400 # Node ID fbd792d91055a31ed09268ed095c65b02c77928d # Parent 11b59b223222717d0863b79b5a2ca85694312e83 add exception handling for case of a network interface don't have corresponding to the Multicast. diff -r 11b59b223222 -r fbd792d91055 src/main/java/jp/ac/u_ryukyu/treevnc/TreeRootFinderListener.java --- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRootFinderListener.java Mon Dec 01 17:03:27 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRootFinderListener.java Mon Dec 01 17:06:36 2014 +0900 @@ -31,7 +31,11 @@ InetAddress mAddr = InetAddress.getByName(McastAddr); soc = new MulticastSocket(ConnectionParams.DEFAULT_VNC_ROOT_FINDER); DatagramPacket recvPacket = new DatagramPacket(buf, BufSize); - soc.joinGroup(mAddr); + try { + soc.joinGroup(mAddr); + } catch (Exception e) { + // Ignore case of a network interface don't have corresponding to the Multicast. + } while (!stopFlag) { soc.receive(recvPacket); String hostname = recvPacket.getAddress().getHostAddress();