提交 fd6b3c1f 编写于 作者: G gaohongtao

Refactor ContextManager#continued

上级 5905068a
......@@ -153,7 +153,7 @@ public class ContextManager implements TracingContextListener, BootService, Igno
if (snapshot == null) {
throw new IllegalArgumentException("ContextSnapshot can't be null.");
}
if (snapshot.isValid() && !snapshot.getTraceSegmentId().equals(get().capture().getTraceSegmentId())) {
if (snapshot.isValid() && !snapshot.isFromCurrent()) {
get().continued(snapshot);
}
}
......
......@@ -113,4 +113,8 @@ public class ContextSnapshot {
public int getEntryApplicationInstanceId() {
return entryApplicationInstanceId;
}
public boolean isFromCurrent() {
return traceSegmentId.equals(ContextManager.capture().getTraceSegmentId());
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册