mirror of
https://github.com/JoelBender/bacpypes
synced 2025-09-28 22:15:23 +08:00
Changed the way we handle an empty lifetime in APDU looking for None instead of 0 to fix a Runtime error when install_task gets a delta of None
This commit is contained in:
parent
d91a7e388a
commit
859cb49c9b
|
@ -102,10 +102,9 @@ class Subscription(OneShotTask, DebugContents):
|
|||
self.proc_id = proc_id
|
||||
self.obj_id = obj_id
|
||||
self.confirmed = confirmed
|
||||
self.lifetime = lifetime
|
||||
|
||||
# if lifetime is non-zero, schedule the subscription to expire
|
||||
if lifetime != 0:
|
||||
# if lifetime is none, consider permanent subscription (0)
|
||||
self.lifetime = 0 if lifetime is None else lifetime
|
||||
self.install_task(delta=self.lifetime)
|
||||
|
||||
def cancel_subscription(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user