mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
fhem.pl: Delete only TEMPORARY devs on writebuffer write error (Forum #101615)
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@19681 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5540a24e1f
commit
8b76a4f66c
16
fhem.pl
16
fhem.pl
@ -762,9 +762,11 @@ while (1) {
|
||||
my $ret;
|
||||
eval { $ret = syswrite($hash->{CD}, $wb); };
|
||||
if($@) {
|
||||
Log 4, "Syswrite: $@, deleting $hash->{NAME}";
|
||||
TcpServer_Close($hash);
|
||||
CommandDelete(undef, $hash->{NAME});
|
||||
Log 4, "$hash->{NAME} syswrite: $@";
|
||||
if($hash->{TEMPORARY}) {
|
||||
TcpServer_Close($hash);
|
||||
CommandDelete(undef, $hash->{NAME});
|
||||
}
|
||||
next;
|
||||
}
|
||||
|
||||
@ -776,9 +778,11 @@ while (1) {
|
||||
if(TcpServer_WantRead($hash));
|
||||
|
||||
} elsif(!$ret) { # zero=EOF, undef=error
|
||||
Log 4, "Write error to $p, deleting $hash->{NAME}";
|
||||
TcpServer_Close($hash);
|
||||
CommandDelete(undef, $hash->{NAME});
|
||||
Log 4, "$hash->{NAME} write error to $p";
|
||||
if($hash->{TEMPORARY}) {
|
||||
TcpServer_Close($hash);
|
||||
CommandDelete(undef, $hash->{NAME})
|
||||
}
|
||||
|
||||
} else {
|
||||
if($ret >= length($wb)) { # for the > see Forum #29963
|
||||
|
Loading…
x
Reference in New Issue
Block a user