Skip to content

Commit

Permalink
Cancel timeline polling timer when the vmService is closed (#3304)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenzieschmoll authored Aug 24, 2021
1 parent 5c4eec7 commit fb7d2f9
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,11 @@ class PerformanceController extends DisposableController
}
}));

autoDispose(serviceManager.onConnectionClosed.listen((_) {
_pollingTimer?.cancel();
_timelinePollingRateLimiter?.dispose();
}));

// Load available timeline events.
await _pullTraceEventsFromVmTimeline(shouldPrimeThreadIds: true);

Expand Down

0 comments on commit fb7d2f9

Please sign in to comment.