File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Sources/BugsnagPerformance/Private/Instrumentation Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 2020
2121using namespace bugsnag ;
2222
23+ static constexpr CFTimeInterval kMaxDurationFromLaunchToActive = 5 ;
2324static constexpr CFTimeInterval kMaxDuration = 120 ;
2425
2526static CFAbsoluteTime getProcessStartTime () noexcept ;
@@ -181,6 +182,12 @@ static inline bool isActivePrewarm(void) {
181182 return ;
182183 }
183184 shouldRespondToAppDidBecomeActive_ = false ;
185+
186+ if (CFAbsoluteTimeGetCurrent () > didFinishLaunchingAtTime_ + kMaxDurationFromLaunchToActive ) {
187+ abortAllSpans ();
188+ isEnabled_ = false ;
189+ return ;
190+ }
184191
185192 didBecomeActiveAtTime_ = CFAbsoluteTimeGetCurrent ();
186193 [[BugsnagPerformanceCrossTalkAPI sharedInstance ] willEndUIInitSpan: uiInitSpan_];
You can’t perform that action at this time.
0 commit comments