mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
- bugfix: 30_MilightBridge: Minor change to ping code to try and resolve crash when hostname not in dns
git-svn-id: https://svn.fhem.de/fhem/trunk@8812 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
588f327dfb
commit
e5aa7387f7
@ -1,5 +1,7 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- bugfix: 30_MilightBridge: Minor change to ping code to try and resolve
|
||||
crash when hostname not in dns
|
||||
- bugfix: pilight_ctrl: reset - clear send queue
|
||||
- feature: pilight_ctrl: add attribute SendTimeout for aborting sending commands
|
||||
- feature: FB_CALLMONITOR: add TR-064 support for remote phonebook reading
|
||||
|
@ -203,14 +203,12 @@ sub MilightBridge_State(@)
|
||||
|
||||
# Do a ping check to see if bridge is reachable
|
||||
# check via ping
|
||||
my $pingstatus = "ok";
|
||||
my $pingstatus = "unreachable";
|
||||
my $p = Net::Ping->new('udp');
|
||||
if( $p->ping($hash->{HOST}, 2)) {
|
||||
$pingstatus = "ok";
|
||||
} else {
|
||||
$pingstatus = "unreachable";
|
||||
}
|
||||
my $alive = $p->ping($hash->{HOST}, 2);
|
||||
$p->close();
|
||||
$pingstatus = "ok" if $alive;
|
||||
|
||||
# And update state
|
||||
readingsSingleUpdate($hash, "state", $pingstatus, 1);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user