fakeRoku: don't start listener if disabled

git-svn-id: https://svn.fhem.de/fhem/trunk@11870 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme1968
2016-07-31 13:33:36 +00:00
parent 88b69e322d
commit f8a7c49437

View File

@@ -224,6 +224,8 @@ fakeRoku_startListener($)
fakeRoku_stopListener($hash);
return undef if( AttrVal($name, "disable", 0 ) == 1 );
my $port = AttrVal($name, 'httpPort', 0);
if( my $socket = IO::Socket::INET->new(LocalPort=>$port, Listen=>10, Blocking=>0, ReuseAddr=>1, ReusePort=>defined(&ReusePort)?1:0) ) {