70_CanOverEthernet: module crashed when UDP port was occupied
git-svn-id: https://svn.fhem.de/fhem/trunk@20429 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -73,8 +73,10 @@ sub CanOverEthernet_Define($$) {
|
|||||||
my $portno = 5441;
|
my $portno = 5441;
|
||||||
my $conn = IO::Socket::INET->new(Proto=>"udp",LocalPort=>$portno);
|
my $conn = IO::Socket::INET->new(Proto=>"udp",LocalPort=>$portno);
|
||||||
|
|
||||||
Log3 $name, 0, "CanOverEthernet ($name) - ERROR: Unable to open port 5441 for reading."
|
if ( ! defined $conn ) {
|
||||||
unless defined ($conn);
|
Log3 $name, 0, "CanOverEthernet ($name) - ERROR: Unable to open port 5441 for reading. Maybe it's opened by another process already?";
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
$hash->{FD} = $conn->fileno();
|
$hash->{FD} = $conn->fileno();
|
||||||
$hash->{CD} = $conn;
|
$hash->{CD} = $conn;
|
||||||
|
|||||||
Reference in New Issue
Block a user