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:
parent
186115d302
commit
4c79d1d301
@ -53,6 +53,8 @@ fakeRoku_getLocalIP()
|
||||
PeerAddr => '8.8.8.8:53', # google dns
|
||||
#PeerAddr => '198.41.0.4:53', # a.root-servers.net
|
||||
);
|
||||
return '<unknown>' if( !$socket );
|
||||
|
||||
my $ip = $socket->sockhost;
|
||||
close( $socket );
|
||||
|
||||
|
@ -61,6 +61,8 @@ plex_getLocalIP()
|
||||
PeerAddr => '8.8.8.8:53', # google dns
|
||||
#PeerAddr => '198.41.0.4:53', # a.root-servers.net
|
||||
);
|
||||
return '<unknown>' if( !$socket );
|
||||
|
||||
my $ip = $socket->sockhost;
|
||||
close( $socket );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user