chore: safeguard span finish

This commit is contained in:
Chirag Aggarwal 2026-02-03 18:30:51 +05:30
parent c04353bd38
commit 4c08cb36a8
2 changed files with 2 additions and 2 deletions

View file

@ -65,7 +65,7 @@ class Interval extends Action
} catch (\Exception $e) {
Span::error($e);
} finally {
Span::current()->finish();
Span::current()?->finish();
}
});
}

View file

@ -124,7 +124,7 @@ class Messaging extends Action
Span::error($e);
throw $e;
} finally {
Span::current()->finish();
Span::current()?->finish();
}
}