mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
buxgfix: prevent fhem from stalling if telnet times out in 66_ECMD.pm
git-svn-id: https://svn.fhem.de/fhem/trunk@1070 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
9ede1c3311
commit
81740a9024
@ -10,6 +10,7 @@
|
||||
- bugfix: FHEM2FHEM should work with CUL again, after syntax change
|
||||
- feature: CUL directio mode (No Device::SerialPort needed)
|
||||
- feature: FritzBox 7270 ZIP file
|
||||
- buxgfix: prevent fhem from stalling if telnet times out in 66_ECMD.pm
|
||||
|
||||
- 2011-07-08 (5.1)
|
||||
- feature: smallscreen optimizations for iPhone
|
||||
|
@ -149,7 +149,16 @@ ECMD_OpenDev($$)
|
||||
return;
|
||||
}
|
||||
|
||||
my $conn = IO::Socket::INET->new(PeerAddr => $devicename);
|
||||
my $conn;
|
||||
eval {
|
||||
local $SIG{ALRM} = sub { die 'Timed Out'; };
|
||||
alarm 10;
|
||||
$conn = IO::Socket::INET->new(PeerAddr => $devicename, timeout => 5);
|
||||
};
|
||||
alarm 0;
|
||||
$conn= undef if $@;
|
||||
# return "Error: timeout." if ( $@ && $@ =~ /Timed Out/ );
|
||||
# return "Error: Eval corrupted: $@" if $@;
|
||||
if($conn) {
|
||||
delete($hash->{NEXT_OPEN})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user