mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
fhem.pl: shutdown: fix for overoptimized browser (Forum #105729)
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@22467 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
ec44222e70
commit
dd69c24de1
11
fhem.pl
11
fhem.pl
@ -1821,6 +1821,17 @@ CommandShutdown($$;$$$)
|
|||||||
|
|
||||||
WriteStatefile();
|
WriteStatefile();
|
||||||
unlink($attr{global}{pidfilename}) if($attr{global}{pidfilename});
|
unlink($attr{global}{pidfilename}) if($attr{global}{pidfilename});
|
||||||
|
|
||||||
|
# Avoid restarts in overoptimized browser #105729
|
||||||
|
doShutdown({p=>$param, e=>$exitValue}) if(!$cl);
|
||||||
|
InternalTimer(time()+1, sub(){doShutdown(@_)}, {p=>$param,e=>$exitValue}, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub
|
||||||
|
doShutdown($$)
|
||||||
|
{
|
||||||
|
my ($param, $exitValue) = ($_[0]->{p}, $_[0]->{e});
|
||||||
|
|
||||||
if($param && $param eq "restart") {
|
if($param && $param eq "restart") {
|
||||||
if ($^O !~ m/Win/) {
|
if ($^O !~ m/Win/) {
|
||||||
system("(sleep " . AttrVal("global", "restartDelay", 2) .
|
system("(sleep " . AttrVal("global", "restartDelay", 2) .
|
||||||
|
Loading…
x
Reference in New Issue
Block a user