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;
|
my $ret;
|
||||||
eval { $ret = syswrite($hash->{CD}, $wb); };
|
eval { $ret = syswrite($hash->{CD}, $wb); };
|
||||||
if($@) {
|
if($@) {
|
||||||
Log 4, "Syswrite: $@, deleting $hash->{NAME}";
|
Log 4, "$hash->{NAME} syswrite: $@";
|
||||||
TcpServer_Close($hash);
|
if($hash->{TEMPORARY}) {
|
||||||
CommandDelete(undef, $hash->{NAME});
|
TcpServer_Close($hash);
|
||||||
|
CommandDelete(undef, $hash->{NAME});
|
||||||
|
}
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -776,9 +778,11 @@ while (1) {
|
|||||||
if(TcpServer_WantRead($hash));
|
if(TcpServer_WantRead($hash));
|
||||||
|
|
||||||
} elsif(!$ret) { # zero=EOF, undef=error
|
} elsif(!$ret) { # zero=EOF, undef=error
|
||||||
Log 4, "Write error to $p, deleting $hash->{NAME}";
|
Log 4, "$hash->{NAME} write error to $p";
|
||||||
TcpServer_Close($hash);
|
if($hash->{TEMPORARY}) {
|
||||||
CommandDelete(undef, $hash->{NAME});
|
TcpServer_Close($hash);
|
||||||
|
CommandDelete(undef, $hash->{NAME})
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if($ret >= length($wb)) { # for the > see Forum #29963
|
if($ret >= length($wb)) { # for the > see Forum #29963
|
||||||
|
Loading…
x
Reference in New Issue
Block a user