2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

16_STACKABLE.pm: add some timeout to the blocking get

git-svn-id: https://svn.fhem.de/fhem/trunk@14018 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2017-04-17 16:33:06 +00:00
parent b74436f96b
commit 426f14e3f1

View File

@ -130,7 +130,9 @@ STACKABLE_IOReadFn($) # used by synchronuous get
$me->{IODev}{PARTIAL} = "";
}
while($buf !~ m/\n/) {
$buf .= DevIo_SimpleRead($me->{IODev}); # may block
my $ret = DevIo_SimpleReadWithTimeout($me->{IODev}, 1); # may block
return undef if(!defined($ret));
$buf .= $ret;
}
my $mName = $me->{NAME};