mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[tesla] Prevent NPE (#10872)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
This commit is contained in:
parent
54d88a84ce
commit
f506ec299b
@ -560,7 +560,9 @@ public class TeslaVehicleHandler extends BaseThingHandler {
|
||||
}
|
||||
|
||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR);
|
||||
eventClient.close();
|
||||
if (eventClient != null) {
|
||||
eventClient.close();
|
||||
}
|
||||
} else if ((System.currentTimeMillis() - apiIntervalTimestamp) > 1000
|
||||
* TeslaAccountHandler.API_ERROR_INTERVAL_SECONDS) {
|
||||
logger.trace("Resetting the error counter. ({} errors in the last interval)", apiIntervalErrors);
|
||||
|
Loading…
Reference in New Issue
Block a user