2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

01_FHEMWEB.pm: speed up FW_closeInactiveClients a bit (Forum #117399)

git-svn-id: https://svn.fhem.de/fhem/trunk@23470 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2021-01-04 18:50:59 +00:00
parent 4fd3517445
commit 722b9068bb

View File

@ -3395,9 +3395,10 @@ FW_closeInactiveClients()
{
my $now = time();
foreach my $dev (keys %defs) {
next if(!$defs{$dev}{TYPE} || $defs{$dev}{TYPE} ne "FHEMWEB" ||
!$defs{$dev}{LASTACCESS} || $defs{$dev}{inform} ||
($now - $defs{$dev}{LASTACCESS}) < 60);
my $h = $defs{$dev};
next if(!$h->{TYPE} || $h->{TYPE} ne "FHEMWEB" ||
!$h->{LASTACCESS} || $h->{inform} ||
($now - $h->{LASTACCESS}) < 60);
Log3 $FW_wname, 4, "Closing inactive connection $dev";
FW_Undef($defs{$dev}, undef);
delete $defs{$dev};