Skip to content

Commit

Permalink
Fixed NPE in ZigbeeIsAliveTracker.scheduleTask(...) (openhab#445)
Browse files Browse the repository at this point in the history
In scheduleTask now there is a check to ensure that the timeout task is
scheduled only if the handler is known to the tracker.

Signed-off-by: Tommaso Travaglino <[email protected]>
  • Loading branch information
TomTravaglino authored and cdjackson committed May 20, 2019
1 parent a083b6e commit 7fce690
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void resetTimer(ZigBeeThingHandler zigBeeThingHandler) {

private void scheduleTask(ZigBeeThingHandler handler) {
ScheduledFuture<?> existingTask = scheduledTasks.get(handler);
if (existingTask == null) {
if (existingTask == null && handlerIntervalMapping.containsKey(handler)) {
int interval = handlerIntervalMapping.get(handler);
logger.debug("Scheduling timeout task for thingUID={} in {} seconds",
handler.getThing().getUID().getAsString(), interval);
Expand Down

0 comments on commit 7fce690

Please sign in to comment.