[ipcamera] Fix Reolink will not update a new token after a disconnect. (#17629)

* Fix: Reolink will not update a new token after a disconnect.

Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
Matthew Skinner 2024-10-26 19:43:39 +11:00 committed by Ciprian Pascu
parent c8022bd1d4
commit 473aa59aed

View File

@ -1393,6 +1393,11 @@ public class IpCameraHandler extends BaseThingHandler {
handle.cameraOnline(getThing().getUID().getId());
}
}
if (thing.getThingTypeUID().getId().equals(REOLINK_THING) && cameraConfig.useToken
&& authenticationJob == null) {
logger.debug("Token thread for REOLINK was stopped, restarting it now.");
authenticationJob = threadPool.scheduleWithFixedDelay(this::getReolinkToken, 0, 45, TimeUnit.MINUTES);
}
}
void snapshotIsFfmpeg() {