Skip to content

Commit

Permalink
feat: small performance improvement for ServiceInfo asking questions (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Dec 15, 2023
1 parent 157185f commit 810a309
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/zeroconf/_services/info.pxd
Expand Up @@ -124,4 +124,4 @@ cdef class ServiceInfo(RecordUpdateListener):
cpdef async_clear_cache(self)

@cython.locals(cache=DNSCache)
cdef _generate_request_query(self, object zc, object now, object question_type)
cdef _generate_request_query(self, object zc, double now, object question_type)
2 changes: 1 addition & 1 deletion src/zeroconf/_services/info.py
Expand Up @@ -845,7 +845,7 @@ def _generate_request_query(
out.add_question_or_one_cache(cache, now, name, _TYPE_TXT, _CLASS_IN)
out.add_question_or_all_cache(cache, now, server_or_name, _TYPE_A, _CLASS_IN)
out.add_question_or_all_cache(cache, now, server_or_name, _TYPE_AAAA, _CLASS_IN)
if question_type == DNS_QUESTION_TYPE_QU:
if question_type is DNS_QUESTION_TYPE_QU:
for question in out.questions:
question.unicast = True
return out
Expand Down

0 comments on commit 810a309

Please sign in to comment.