32_SYSSTAT.pm: better handling of noSSH

git-svn-id: https://svn.fhem.de/fhem/trunk@23945 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme1968
2021-03-13 11:50:06 +00:00
parent 38ff479ef4
commit 111cfd1116

View File

@@ -907,7 +907,11 @@ SYSSTAT_GetUpdate($)
my ($hash) = @_;
my $name = $hash->{NAME};
if( $hash->{QUEUE} && scalar @{$hash->{QUEUE}} ) {
if( AttrVal($name, "noSSH", undef) ) {
my @queue = ();
$hash->{QUEUE} = \@queue;
} elsif( !AttrVal($name, "noSSH", undef) && $hash->{QUEUE} && scalar @{$hash->{QUEUE}} ) {
Log3 $name, 2, "$name: unanswered query in queue, reconnecting";
SYSSTAT_Connect($hash);
return;