Skip to content

Commit

Permalink
chore: make isRunning variable privatge
Browse files Browse the repository at this point in the history
  • Loading branch information
khatruong2009 committed Sep 7, 2023
1 parent 11ae431 commit e59bbed
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ class DefaultRemoteLoggingConstraintProvider
Timer? _timer;

/// Whether the periodic fetch is running.
bool isRunning = false;
bool _isRunning = false;

/// Stops the periodic fetch.
void stop() {
_timer?.cancel();
isRunning = false;
_isRunning = false;
}

@override
Expand Down Expand Up @@ -139,11 +139,11 @@ class DefaultRemoteLoggingConstraintProvider

/// Refreshes the constraint from the endpoint periodically.
Future<void> _refreshConstraintPeriodically() async {
if (isRunning) {
if (_isRunning) {
return;
}

isRunning = true;
_isRunning = true;
_timer?.cancel();

_timer = Timer.periodic(
Expand Down

0 comments on commit e59bbed

Please sign in to comment.