mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-25 03:44:52 +00:00
fhem.pl/MQTT2_CLIENT.pm: try to avoid & debug endless loop (Forum #111959)
git-svn-id: https://svn.fhem.de/fhem/trunk@28126 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
88a00b58f6
commit
9cd5310176
@ -116,6 +116,10 @@ MQTT2_CLIENT_connect($;$)
|
||||
if($mc ne -1 && $hash->{nrFailedConnects} >= $mc) {
|
||||
Log3 $me, 2, "maxFailedConnects ($mc) reached, no more reconnect attemtps";
|
||||
delete($readyfnlist{"$me.".$hash->{DeviceName}}); # Source of retry
|
||||
if("$me.".$hash->{DeviceName} ne $hash->{_readyKey}) { #111959
|
||||
Log3 $me, 2, "RFN ERROR: $me.$hash->{DeviceName} ne $hash->{_readyKey}";
|
||||
delete($readyfnlist{$hash->{_readyKey}});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -846,12 +846,14 @@ while (1) {
|
||||
next if(!$h); # due to rereadcfg / delete
|
||||
next if($h->{NEXT_OPEN} && gettimeofday() < $h->{NEXT_OPEN});
|
||||
|
||||
$h->{_readyKey} = $p; # Endless-Loop-Debugging #111959
|
||||
if(CallFn($h->{NAME}, "ReadyFn", $h)) {
|
||||
if($readyfnlist{$p}) { # delete itself inside ReadyFn
|
||||
CallFn($h->{NAME}, "ReadFn", $h);
|
||||
}
|
||||
|
||||
}
|
||||
delete($h->{_readyKey});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user