We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a1f2200 commit d56d870Copy full SHA for d56d870
1 file changed
src/Tracer/Tracer.php
@@ -60,14 +60,14 @@ public function assign(SpanContext $context): InjectableInterface
60
61
public function remove(SpanContext $context): InjectableInterface
62
{
63
- if (0 === $this->stack->count()) {
64
- return $this;
65
- }
+ while ($this->stack->valid()) {
+ if (spl_object_hash($this->stack->top()) !== spl_object_hash($context)) {
+ $this->stack->pop();
66
+ continue;
67
+ }
68
- if (spl_object_hash($this->stack->top()) !== spl_object_hash($context)) {
- throw new \LogicException('Current context is different');
69
+ break;
70
}
- $this->stack->pop();
71
72
return $this;
73
0 commit comments