mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
fhem.pl: Log ERROR for addToWriteBuffer without FD (Forum #113947)
git-svn-id: https://svn.fhem.de/fhem/trunk@22726 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
faf6f92f13
commit
14ac514342
@ -213,8 +213,12 @@ TcpServer_Close($@)
|
|||||||
delete($hash->{CD});
|
delete($hash->{CD});
|
||||||
delete($selectlist{$name});
|
delete($selectlist{$name});
|
||||||
delete($hash->{FD}); # Avoid Read->Close->Write
|
delete($hash->{FD}); # Avoid Read->Close->Write
|
||||||
delete $attr{$name} if($dodel);
|
if($dodel) {
|
||||||
delete $defs{$name} if($dodel);
|
delete $attr{$name};
|
||||||
|
delete $defs{$name};
|
||||||
|
} else {
|
||||||
|
$hash->{stacktrace} = stacktraceAsString(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(defined($hash->{SERVERSOCKET})) { # Server
|
if(defined($hash->{SERVERSOCKET})) { # Server
|
||||||
close($hash->{SERVERSOCKET});
|
close($hash->{SERVERSOCKET});
|
||||||
@ -243,6 +247,7 @@ TcpServer_Disown($)
|
|||||||
delete($hash->{CD});
|
delete($hash->{CD});
|
||||||
delete($selectlist{$name});
|
delete($selectlist{$name});
|
||||||
delete($hash->{FD}); # Avoid Read->Close->Write
|
delete($hash->{FD}); # Avoid Read->Close->Write
|
||||||
|
$hash->{stacktrace} = stacktraceAsString(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -5365,6 +5365,14 @@ addToWritebuffer($$@)
|
|||||||
{
|
{
|
||||||
my ($hash, $txt, $callback, $nolimit) = @_;
|
my ($hash, $txt, $callback, $nolimit) = @_;
|
||||||
|
|
||||||
|
if(!defined($hash->{FD})) {
|
||||||
|
my $n = $hash->{NAME};
|
||||||
|
Log 1, "ERROR: addToWritebuffer for $n without FD";
|
||||||
|
Log 1, "probably caused at ".$hash->{stacktrace} if($hash->{stacktrace});
|
||||||
|
delete($defs{$n});
|
||||||
|
delete($attr{$n});
|
||||||
|
return;
|
||||||
|
}
|
||||||
if($hash->{isChild}) { # Wont go to the main select in a forked process
|
if($hash->{isChild}) { # Wont go to the main select in a forked process
|
||||||
TcpServer_WriteBlocking( $hash, $txt );
|
TcpServer_WriteBlocking( $hash, $txt );
|
||||||
if($callback) {
|
if($callback) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user