Skip to content

Commit

Permalink
Update bundles/org.openhab.binding.airgradient/src/main/java/org/open…
Browse files Browse the repository at this point in the history
…hab/binding/airgradient/internal/discovery/AirGradientLocationDiscoveryService.java

Co-authored-by: lsiepel <leosiepel@gmail.com>
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
  • Loading branch information
austvik and lsiepel committed Apr 28, 2024
1 parent f1e24cb commit bebb75b
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ protected void stopBackgroundDiscovery() {

ScheduledFuture<?> localDiscoveryFuture = this.discoveryFuture;
if (localDiscoveryFuture != null) {
if (!localDiscoveryFuture.isCancelled()) {
localDiscoveryFuture.cancel(true);
this.discoveryFuture = null;
}
localDiscoveryFuture.cancel(true);
this.discoveryFuture = null;
}
}

Expand Down

0 comments on commit bebb75b

Please sign in to comment.