~singpolyma/sgx-jmp

8a4e12980a23f7752f11f4fc8e511411ffd7c839 — Stephen Paul Weber 1 year, 10 months ago 655624d
Command.execution setter
1 files changed, 5 insertions(+), 1 deletions(-)

M lib/command.rb
M lib/command.rb => lib/command.rb +5 -1
@@ 11,6 11,10 @@ class Command
		Thread.current[:execution]
	end

	def self.execution=(exe)
		Thread.current[:execution] = exe
	end

	def self.reply(stanza=nil, &blk)
		execution.reply(stanza, &blk)
	end


@@ 51,7 55,7 @@ class Command
		def execute
			StatsD.increment("command", tags: ["node:#{iq.node}"])
			EMPromise.resolve(nil).then {
				Thread.current[:execution] = self
				Command.execution = self
				sentry_hub
				catch_after(EMPromise.resolve(yield self))
			}.catch(&method(:panic))