1
0
mirror of https://github.com/JoelBender/bacpypes synced 2025-10-27 00:57:47 +08:00

bring branch up-to-date

This commit is contained in:
Joel Bender
2017-12-22 11:05:48 -05:00
parent 7236a4bbf7
commit 1c1ebce4b8
10 changed files with 228 additions and 21 deletions

View File

@@ -538,7 +538,7 @@ class BIPForeign(BIPSAP, Client, Server, OneShotTask, DebugContents):
self.bbmdTimeToLive = ttl
# install this task to run when it gets a chance
self.install_task(delta=0)
self.install_task(when=0)
def unregister(self):
"""Drop the registration with a BBMD."""

View File

@@ -142,6 +142,9 @@ def run(spin=SPIN, sigterm=stop, sigusr1=print_stack):
time.sleep(sleeptime)
delta -= sleeptime
# delta should be no more than the spin value
delta = min(delta, spin)
# if there are deferred functions, use a small delta
if deferredFns:
delta = min(delta, 0.001)