diff --git a/CHANGED b/CHANGED index 9b90b5ca9..a64ccffe5 100644 --- a/CHANGED +++ b/CHANGED @@ -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. diff --git a/FHEM/01_FHEMWEB.pm b/FHEM/01_FHEMWEB.pm index d28e6100e..527230e17 100755 --- a/FHEM/01_FHEMWEB.pm +++ b/FHEM/01_FHEMWEB.pm @@ -1949,34 +1949,14 @@ FW_Notify($$) push @data,("$tn $dt $dn ".$dev->{CHANGED}[$i]."
"); } } - } 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 diff --git a/FHEM/TcpServerUtils.pm b/FHEM/TcpServerUtils.pm index 35a84ff02..d25e29df2 100644 --- a/FHEM/TcpServerUtils.pm +++ b/FHEM/TcpServerUtils.pm @@ -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";