From 7b21db735f5eb44e817dc8469ab0403e68fa6f65 Mon Sep 17 00:00:00 2001 From: boris Date: Wed, 4 Mar 2015 08:01:36 +0000 Subject: [PATCH] Log a message and abort harvesting, rather than failing with an exception, in case harvesting is not possible due to the harvester not supporting Agents with multiple components. --- src/org/ice4j/ice/harvest/MultiplexingTcpHostHarvester.java | 3 ++- src/org/ice4j/ice/harvest/SinglePortUdpHarvester.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/org/ice4j/ice/harvest/MultiplexingTcpHostHarvester.java b/src/org/ice4j/ice/harvest/MultiplexingTcpHostHarvester.java index 7ed72af..1a00f3a 100644 --- a/src/org/ice4j/ice/harvest/MultiplexingTcpHostHarvester.java +++ b/src/org/ice4j/ice/harvest/MultiplexingTcpHostHarvester.java @@ -572,8 +572,9 @@ public class MultiplexingTcpHostHarvester * because we use the local "ufrag" to de-multiplex the accept()-ed * sockets between the known components. */ - throw new IllegalStateException( + logger.info( "More than one Component for an Agent, cannot harvest."); + return new LinkedList(); } List candidates = createLocalCandidates(component); diff --git a/src/org/ice4j/ice/harvest/SinglePortUdpHarvester.java b/src/org/ice4j/ice/harvest/SinglePortUdpHarvester.java index 0119f7c..87b4728 100644 --- a/src/org/ice4j/ice/harvest/SinglePortUdpHarvester.java +++ b/src/org/ice4j/ice/harvest/SinglePortUdpHarvester.java @@ -374,8 +374,9 @@ public class SinglePortUdpHarvester * because we use the local "ufrag" from an incoming STUN packet * to setup de-multiplexing based on remote transport address. */ - throw new IllegalStateException( + logger.info( "More than one Component for an Agent, cannot harvest."); + return new LinkedList(); } MyCandidate candidate = new MyCandidate(component, ufrag);