FHEM/01_FHEMWEB.pm: some asyncoutput debugging for #85358

git-svn-id: https://svn.fhem.de/fhem/trunk@16350 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2018-03-07 21:30:37 +00:00
parent bfbd9d6adf
commit 010876739c

View File

@@ -374,6 +374,7 @@ FW_Read($$)
# substr( $data, $i, 1, substr( $data, $i, 1, ) ^ substr($mask, $i% , 1) );
#}
#Log 1, "Received via websocket: ".unpack("H*",$data);
$hash->{BUF} = "";
return;
}
@@ -678,7 +679,11 @@ FW_AsyncOutput($$)
# find the longpoll connection with the same fw_id as the page that was the
# origin of the get command
my $fwid = $hash->{FW_ID};
return if(!$fwid);
if(!$fwid) {
Log3 $hash->{SNAME}, 4, "AsyncOutput from $hash->{NAME} without FW_ID";
return;
}
Log3 $hash->{SNAME}, 4, "AsyncOutput from $hash->{NAME}";
$hash = $FW_id2inform{$fwid};
if($hash) {
FW_addToWritebuffer($hash, $data."\n");