Skip to content

Commit 57b5b0a

Browse files
committed
fix: ensure question history suppresses duplicates within 999ms
There was a bug in the cython conversion logic that would loose precision on the float to double conversion
1 parent f78a196 commit 57b5b0a

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/zeroconf/_history.pxd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ cdef class QuestionHistory:
99

1010
cdef cython.dict _history
1111

12-
cpdef add_question_at_time(self, DNSQuestion question, float now, cython.set known_answers)
12+
cpdef add_question_at_time(self, DNSQuestion question, double now, cython.set known_answers)
1313

14-
@cython.locals(than=cython.double, previous_question=cython.tuple, previous_known_answers=cython.set)
15-
cpdef bint suppresses(self, DNSQuestion question, cython.double now, cython.set known_answers)
14+
@cython.locals(than=double, previous_question=cython.tuple, previous_known_answers=cython.set)
15+
cpdef bint suppresses(self, DNSQuestion question, double now, cython.set known_answers)
1616

17-
@cython.locals(than=cython.double, now_known_answers=cython.tuple)
18-
cpdef async_expire(self, cython.double now)
17+
@cython.locals(than=double, now_known_answers=cython.tuple)
18+
cpdef async_expire(self, double now)

0 commit comments

Comments
 (0)