From 77a9806f7f71b08e8bae23facac462f270676337 Mon Sep 17 00:00:00 2001 From: markusbloch <> Date: Sat, 9 Feb 2013 12:51:24 +0000 Subject: [PATCH] preventing multiple timer loops in case of a redefine git-svn-id: https://svn.fhem.de/fhem/trunk@2675 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/73_PRESENCE.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/73_PRESENCE.pm b/fhem/FHEM/73_PRESENCE.pm index 3d9c35e0e..8c8e637bd 100755 --- a/fhem/FHEM/73_PRESENCE.pm +++ b/fhem/FHEM/73_PRESENCE.pm @@ -128,8 +128,10 @@ PRESENCE_Define($$) { $hash->{MODE} = $destination; - InternalTimer(gettimeofday()+2, "PRESENCE_StartLocalScan", $hash, 1) unless(exists($hash->{helper}{DISABLED}) and $hash->{helper}{DISABLED}); - return; + + RemoveInternalTimer($hash); + InternalTimer(gettimeofday()+2, "PRESENCE_StartLocalScan", $hash, 1) unless(exists($hash->{helper}{DISABLED}) and $hash->{helper}{DISABLED}); + return; } elsif($destination eq "lan-bluetooth")