Skip to content

Commit 52fb30c

Browse files
authored
Merge pull request #19600 from jpmcmu/HPCC-33574
HPCC-33574 ActiveSpanScope false error message due to null spans Reviewed-by: Gavin Halliday <[email protected]> Merged-by: Gavin Halliday <[email protected]>
2 parents e4297a7 + d0fc74b commit 52fb30c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: system/jlib/jtrace.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -1648,7 +1648,10 @@ ISpan * CTraceManager::createServerSpan(const char * name, const IProperties * h
16481648
ActiveSpanScope::ActiveSpanScope(ISpan * _ptr) : ActiveSpanScope(_ptr, queryThreadedActiveSpan()) {}
16491649
ActiveSpanScope::ActiveSpanScope(ISpan * _ptr, ISpan * _prev) : span(_ptr), prevSpan(_prev)
16501650
{
1651-
setThreadedActiveSpan(_ptr);
1651+
if (span == nullptr)
1652+
span = queryNullSpan();
1653+
1654+
setThreadedActiveSpan(span);
16521655
}
16531656

16541657
ActiveSpanScope::~ActiveSpanScope()

0 commit comments

Comments
 (0)