2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-25 16:05:19 +00:00

LandroidUtils.pm: better attribute checking (Forum #111959)

git-svn-id: https://svn.fhem.de/fhem/trunk@27440 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2023-04-13 08:17:39 +00:00
parent 0a6bba3dea
commit 90a6e37b14

View File

@ -231,9 +231,12 @@ Landroid_connect4($)
$m2c->{clientId} = "$prefix/USER/$m2c->{userId}/FHEM/$wxid"; $m2c->{clientId} = "$prefix/USER/$m2c->{userId}/FHEM/$wxid";
my $a = $attr{$m2c_name}; my $a = $attr{$m2c_name};
$a->{keepaliveTimeout} = 600 if(!AttrVal($m2c_name, "keepaliveTimeout",0)); $a->{keepaliveTimeout} = 600
$a->{maxFailedConnects} = 20 if(!AttrVal($m2c_name, "maxFailedConnects", 0)); if(!defined(AttrVal($m2c_name, "keepaliveTimeout", undef)));
$a->{nextOpenDelay} = 180 if(!AttrVal($m2c_name, "nextOpenDelay", 0)); $a->{maxFailedConnects} = 20
if(!defined(AttrVal($m2c_name, "maxFailedConnects", undef)));
$a->{nextOpenDelay} = 180
if(!defined(AttrVal($m2c_name, "nextOpenDelay", undef)));
MQTT2_CLIENT_Disco($m2c, 1); # Make sure reconnect will work MQTT2_CLIENT_Disco($m2c, 1); # Make sure reconnect will work
MQTT2_CLIENT_connect($m2c, 1); MQTT2_CLIENT_connect($m2c, 1);
} }