Skip to content

Commit d0fc74b

Browse files
committed
HPCC-33574 ActiveSpanScope false error message due to null spans
- Modified ActiveSpanScope to convert nullptr to the cNullSpan Signed-off-by: James McMullan [email protected]
1 parent dc1142c commit d0fc74b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

system/jlib/jtrace.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -1585,7 +1585,10 @@ ISpan * CTraceManager::createServerSpan(const char * name, const IProperties * h
15851585
ActiveSpanScope::ActiveSpanScope(ISpan * _ptr) : ActiveSpanScope(_ptr, queryThreadedActiveSpan()) {}
15861586
ActiveSpanScope::ActiveSpanScope(ISpan * _ptr, ISpan * _prev) : span(_ptr), prevSpan(_prev)
15871587
{
1588-
setThreadedActiveSpan(_ptr);
1588+
if (span == nullptr)
1589+
span = queryNullSpan();
1590+
1591+
setThreadedActiveSpan(span);
15891592
}
15901593

15911594
ActiveSpanScope::~ActiveSpanScope()

0 commit comments

Comments
 (0)