2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-16 16:56:04 +00:00

00_FBAHAHTTP.pm: fix endless recursion. (Froum #58147)

git-svn-id: https://svn.fhem.de/fhem/trunk@12390 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2016-10-21 05:59:01 +00:00
parent 6d5cdb7e07
commit 71b7914340

View File

@ -81,6 +81,7 @@ FBAHAHTTP_connect($)
"check connection/hostname/fritzbox-user/password")
}
delete($hash->{RetriedCmd});
delete($readyfnlist{"$name.$dev"});
$hash->{".SID"} = $sid;
$hash->{STATE} = "connected";
@ -207,17 +208,17 @@ FBAHAHTTP_ProcessStack($)
Log3 $name, 5, "FBAHAHTTP_Write reply for $name: $_[2]";
if(!defined($_[2]) || $_[2] eq "") {
if($hash->{INRETRY}) {
if($hash->{RetriedCmd}) {
Log3 $name, 1, "No sensible respone after reconnect, giving up";
return;
}
$hash->{INRETRY} = 1;
return if(FBAHAHTTP_connect($hash));
$hash->{RetriedCmd} = $msg;
FBAHAHTTP_ProcessStack($hash);
delete($hash->{INRETRY});
return;
}
delete($hash->{RetriedCmd});
shift @{$hash->{CmdStack}};
if(@{$hash->{CmdStack}} > 0) {
my $ad = AttrVal($name, "async_delay", 0);