lib/ting_yun/instrumentation/thrift.rb in tingyun_rpm-1.4.2 vs lib/ting_yun/instrumentation/thrift.rb in tingyun_rpm-1.5.0
- old
+ new
@@ -115,10 +115,10 @@
t0, node = started_time_and_node(operate)
result = receive_message_without_tingyun(result_klass)
- unless result || result.success
+ unless result && result.success
e = ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, "#{operate} failed: unknown result")
::TingYun::Instrumentation::Support::ExternalError.handle_error(e,metrics(operate)[0])
end
t1 = Time.now.to_f
\ No newline at end of file