2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

37_harmony.pm: stopDiscovery() fix

git-svn-id: https://svn.fhem.de/fhem/trunk@18031 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2018-12-22 20:46:39 +00:00
parent 33cdcbe647
commit 253cf2e232

View File

@ -135,7 +135,7 @@ harmony_stopDiscovery()
Log3 undef, 3, "harmony: stopping discovery" ;
close( $chash->{sendSocket} );
close( $chash->{socket} );
close( $chash->{CD} );
delete $selectlist{$chash->{NAME}};
delete $defs{$chash->{NAME}};
@ -237,6 +237,12 @@ harmony_Undefine($$)
{
my ($hash, $arg) = @_;
if( $hash->{NAME} eq 'harmony:discovery' ) {
harmony_stopDiscovery();
$defs{$hash->{NAME}} = $hash;
return;
}
if( defined($hash->{id}) ) {
delete( $modules{$hash->{TYPE}}{defptr}{$hash->{id}} );
return undef;