mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 04:36:36 +00:00
FHEMWEB: Late checking of write-blocking fix
git-svn-id: https://svn.fhem.de/fhem/trunk@4202 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
e36320295f
commit
70d689b695
@ -1,6 +1,7 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- SVN
|
||||
- bugfix: fhem.pl: write-select to avoid blocking in inform/Event Monitor
|
||||
- bugfix: fix issue with DST changes in 57_Calendar.pm
|
||||
- feature: new module 36_LaCrosse.pm for LaCrosse IT+ temperature and
|
||||
humidity sensors with a JeeLabs JeeLink as RF modem.
|
||||
|
@ -1949,34 +1949,14 @@ FW_Notify($$)
|
||||
push @data,("$tn $dt $dn ".$dev->{CHANGED}[$i]."<br>");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(@data) {
|
||||
# Collect multiple changes (e.g. from notifiees) into one message
|
||||
$ntfy->{INFORMBUF} .= join("\n", map { s/\n/ /gm; $_ } @data)."\n";
|
||||
RemoveInternalTimer($ln);
|
||||
if(length($ntfy->{INFORMBUF}) > 1024) {
|
||||
FW_FlushInform($ln);
|
||||
} else {
|
||||
InternalTimer(gettimeofday()+0.1, "FW_FlushInform", $ln, 0);
|
||||
}
|
||||
addToWritebuffer($ntfy, join("\n", map { s/\n/ /gm; $_ } @data)."\n");
|
||||
}
|
||||
|
||||
return undef;
|
||||
}
|
||||
|
||||
sub
|
||||
FW_FlushInform($)
|
||||
{
|
||||
my ($name) = @_;
|
||||
my $hash = $defs{$name};
|
||||
return if(!$hash);
|
||||
my $c = $hash->{CD};
|
||||
print $c $hash->{INFORMBUF};
|
||||
$hash->{INFORMBUF}="";
|
||||
}
|
||||
|
||||
###################
|
||||
# Compute the state (==second) column
|
||||
sub
|
||||
|
@ -28,6 +28,7 @@ TcpServer_Open($$$)
|
||||
LocalHost => ($global ? undef : "localhost"),
|
||||
LocalPort => $port,
|
||||
Listen => 10,
|
||||
Blocking => 0, # Needed for .WRITEBUFFER@darwin
|
||||
ReuseAddr => 1
|
||||
);
|
||||
$hash->{STATE} = "Initialized";
|
||||
|
Loading…
x
Reference in New Issue
Block a user