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

37_plex.pm,37_fakeRoku.pm: don't crash if no network connection is available

git-svn-id: https://svn.fhem.de/fhem/trunk@11911 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2016-08-06 17:17:14 +00:00
parent 186115d302
commit 4c79d1d301
2 changed files with 4 additions and 0 deletions

View File

@ -53,6 +53,8 @@ fakeRoku_getLocalIP()
PeerAddr => '8.8.8.8:53', # google dns PeerAddr => '8.8.8.8:53', # google dns
#PeerAddr => '198.41.0.4:53', # a.root-servers.net #PeerAddr => '198.41.0.4:53', # a.root-servers.net
); );
return '<unknown>' if( !$socket );
my $ip = $socket->sockhost; my $ip = $socket->sockhost;
close( $socket ); close( $socket );

View File

@ -61,6 +61,8 @@ plex_getLocalIP()
PeerAddr => '8.8.8.8:53', # google dns PeerAddr => '8.8.8.8:53', # google dns
#PeerAddr => '198.41.0.4:53', # a.root-servers.net #PeerAddr => '198.41.0.4:53', # a.root-servers.net
); );
return '<unknown>' if( !$socket );
my $ip = $socket->sockhost; my $ip = $socket->sockhost;
close( $socket ); close( $socket );