~singpolyma/sgx-jmp

9d3db6ed13ff50752ab8dfaa369a123436e71b17 — Stephen Paul Weber 1 year, 4 months ago f699177
Reject promise on stanza error
1 files changed, 5 insertions(+), 1 deletions(-)

M sgx_jmp.rb
M sgx_jmp.rb => sgx_jmp.rb +5 -1
@@ 130,7 130,11 @@ class SessionManager

	def fulfill(stanza)
		id = "#{stanza.from.stripped}/#{stanza.public_send(@id_msg)}"
		@sessions.delete(id)&.fulfill(stanza)
		if stanza.error?
			@sessions.delete(id)&.reject(stanza)
		else
			@sessions.delete(id)&.fulfill(stanza)
		end
	end
end