From 4c2572457377ef3c6d39d07e66f0448583cb479c Mon Sep 17 00:00:00 2001 From: maxwell Date: Tue, 30 Nov 2010 11:33:19 -0800 Subject: [PATCH] do no return in em-webfinger, causeing weird splunk errors --- lib/em-webfinger.rb | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/lib/em-webfinger.rb b/lib/em-webfinger.rb index 6db2cbce2..0bb54a910 100644 --- a/lib/em-webfinger.rb +++ b/lib/em-webfinger.rb @@ -72,21 +72,24 @@ class EMWebfinger begin wf_profile = WebfingerProfile.new(@account, webfinger_profile) - rescue - return process_callbacks "No person could be constructed from this webfinger profile." - end + - http = EventMachine::HttpRequest.new(wf_profile.hcard).get OPTS - http.callback{ - begin - hcard = HCard.build http.response - p = Person.build_from_webfinger(wf_profile, hcard) - process_callbacks(p) - rescue - process_callbacks I18n.t 'webfinger.no_person_constructed' - end - } - http.errback{process_callbacks I18n.t('webfinger.hcard_fetch_failed', :account => @account) } + http = EventMachine::HttpRequest.new(wf_profile.hcard).get OPTS + http.callback{ + begin + hcard = HCard.build http.response + p = Person.build_from_webfinger(wf_profile, hcard) + process_callbacks(p) + rescue + process_callbacks I18n.t 'webfinger.no_person_constructed' + end + } + http.errback{ + process_callbacks I18n.t('webfinger.hcard_fetch_failed', :account => @account) } + + rescue + process_callbacks "No person could be constructed from this webfinger profile." + end end end