def verify_discovered_services(services, to_match)
failure_messages = []
for endpoint in services
begin
verify_discovery_single(endpoint, to_match)
rescue ProtocolError => why
failure_messages << why.message
else
@endpoint = endpoint
return
end
end
Util.log("Discovery verification failure for #{to_match.claimed_id}")
failure_messages.each do |failure_message|
Util.log(" * Endpoint mismatch: " + failure_message)
end
raise ProtocolError, ("No matching endpoint found after "\
"discovering #{to_match.claimed_id}")
end