From 9c0714a51fafed0dd421efa6cc842810855ab026 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 22 May 2017 14:36:54 -0500 Subject: [PATCH] Fix presence There were two handlers -- the more specific one was commented out? And now that we only run the first matching handler, this caused all subscriptions to be eaten. --- sgx-catapult.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sgx-catapult.rb b/sgx-catapult.rb index b5a41511d24e49b5955e3d678e65e5e8bd625728..437c07391cae1bb8419044c9d06330aff1a62e12 100755 --- a/sgx-catapult.rb +++ b/sgx-catapult.rb @@ -313,7 +313,7 @@ module SGXcatapult @gateway_features.uniq! end - presence :subscribe? do |p| + subscription :request? do |p| puts "PRESENCE1: #{p.inspect}" # subscriptions are allowed from anyone - send reply immediately @@ -804,12 +804,6 @@ module SGXcatapult }.catch(&method(:panic)) end - subscription(:request?) do |s| - # TODO: are these the best to return? really need '!' here? - #write_to_stream s.approve! - #write_to_stream s.request! - end - iq :get? do |i| write_to_stream error_msg(i.reply, i.children, 'cancel', 'feature-not-implemented') end