LinkDiscovery: check if Stopped before starting scheduled task.
Change-Id: I6c967525e61d1942efbe6aa221f89f9adebbd464
Showing
1 changed file
with
3 additions
and
0 deletions
... | @@ -241,6 +241,9 @@ public class LinkDiscovery implements TimerTask { | ... | @@ -241,6 +241,9 @@ public class LinkDiscovery implements TimerTask { |
241 | */ | 241 | */ |
242 | @Override | 242 | @Override |
243 | public void run(final Timeout t) { | 243 | public void run(final Timeout t) { |
244 | + if (isStopped()) { | ||
245 | + return; | ||
246 | + } | ||
244 | boolean isMaster = mastershipService.getLocalRole(device.id()) == MASTER; | 247 | boolean isMaster = mastershipService.getLocalRole(device.id()) == MASTER; |
245 | if (!isMaster) { | 248 | if (!isMaster) { |
246 | if (!isStopped()) { | 249 | if (!isStopped()) { | ... | ... |
-
Please register or login to post a comment