mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +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:
parent
b74436f96b
commit
426f14e3f1
@ -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};
|
||||
|
Loading…
Reference in New Issue
Block a user