prevent error when no token

This commit is contained in:
Philipp Wo 2020-12-28 23:22:08 +01:00
parent 8bfba91e2e
commit c2269cfe7a
1 changed files with 1 additions and 1 deletions

View File

@ -561,7 +561,7 @@ sub TadoAPI_NewTokenRequest {
close($TOKENFILE);
# token lifetime management
if (defined($decoded_data)){
if ( defined($decoded_data->{'expires_in'}) ){
$hash->{TOKEN_LIFETIME} = gettimeofday() + $decoded_data->{'expires_in'};
}
$hash->{TOKEN_LIFETIME_HR} = localtime( $hash->{TOKEN_LIFETIME} );