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.
This commit is contained in:
boris 2015-03-04 08:01:36 +00:00
parent 59deb864f7
commit 7b21db735f
2 changed files with 4 additions and 2 deletions

View File

@ -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<LocalCandidate>();
}
List<LocalCandidate> candidates = createLocalCandidates(component);

View File

@ -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<LocalCandidate>();
}
MyCandidate candidate = new MyCandidate(component, ufrag);