fix chrash FHEM if run apptime parallel

This commit is contained in:
Marko Oldenburg 2016-10-07 12:11:56 +02:00
parent 809d4fad9d
commit 9d2127af34

View File

@ -37,7 +37,7 @@ use TcpServerUtils;
use Encode qw(encode);
my $modulversion = "2.6.3";
my $modulversion = "2.6.4";
my $flowsetversion = "2.6.4";
@ -139,8 +139,8 @@ sub AMAD_Undef($$) {
my ( $hash, $arg ) = @_;
if( $hash->{BRIDGE} ) {
delete $modules{AMAD}{defptr}{BRIDGE} if(defined($modules{AMAD}{defptr}{BRIDGE}));
if( $hash->{BRIDGE} or $hash->{TEMPORARY} == 1 ) {
delete $modules{AMAD}{defptr}{BRIDGE} if( defined($modules{AMAD}{defptr}{BRIDGE}) );
TcpServer_Close( $hash );
}