Converter/Poll.py: fix suspend
[enigma2.git] / lib / python / Components / Converter / Poll.py
index 6db93ef..23ce133 100644 (file)
@@ -25,9 +25,12 @@ class Poll(object):
                self.changed((self.CHANGED_POLL,))
 
        def doSuspend(self, suspended):
                self.changed((self.CHANGED_POLL,))
 
        def doSuspend(self, suspended):
-               self.enabled = not suspended
-               if not suspended:
-                       self.poll()
+               if self.__enabled:
+                       if suspended:
+                               self.__poll_timer.stop()
+                       else:
+                               self.poll()
+                               self.poll_enabled = True
 
        def destroy(self):
                self.__poll_timer.callback.remove(self.poll)
 
        def destroy(self):
                self.__poll_timer.callback.remove(self.poll)