prevent error when no token
This commit is contained in:
parent
8bfba91e2e
commit
c2269cfe7a
@ -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} );
|
||||
|
Loading…
x
Reference in New Issue
Block a user