diff options
author | Rob Austein <sra@hactrn.net> | 2009-04-30 14:10:59 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2009-04-30 14:10:59 +0000 |
commit | 7a27bba01bf302a3cbc5ca144460478f1a1a165b (patch) | |
tree | ff75917335a60e6d6346d731fc38c18c5f429bdb | |
parent | 5f491ae5b05271b08d7761b93f966364b1a884d2 (diff) |
We sort timers on insertion anyway, so just need to avoid duplicates.
svn path=/rpkid/rpki/async.py; revision=2384
-rw-r--r-- | rpkid/rpki/async.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rpkid/rpki/async.py b/rpkid/rpki/async.py index ab1942c1..8a40c404 100644 --- a/rpkid/rpki/async.py +++ b/rpkid/rpki/async.py @@ -81,8 +81,8 @@ class timer(object): else: self.when = when assert isinstance(self.when, rpki.sundial.datetime) - self.cancel() - self.queue.append(self) + if self not in self.queue: + self.queue.append(self) self.queue.sort() def __cmp__(self, other): |