@@ -246,14 +246,14 @@ def response( # pylint: disable=unused-argument
246246 ucast_source = port != _MDNS_PORT
247247 known_answers = DNSRRSet (itertools .chain (* [msg .answers for msg in msgs ]))
248248 query_res = _QueryResponse (self .cache , msgs [0 ], ucast_source )
249- now = current_time_millis ()
250-
251- for question in itertools . chain ( * [ msg . questions for msg in msgs ]) :
252- answer_set : _AnswerWithAdditionalsType = {}
253- self ._answer_question (question , answer_set , known_answers , now )
254- if not ucast_source and question .unicast :
255- query_res .add_qu_question_response (answer_set )
256- else :
249+
250+ for msg in msgs :
251+ for question in msg . questions :
252+ answer_set : _AnswerWithAdditionalsType = {}
253+ self ._answer_question (question , answer_set , known_answers , msg . now )
254+ if not ucast_source and question .unicast :
255+ query_res .add_qu_question_response (answer_set )
256+ continue
257257 if ucast_source :
258258 query_res .add_ucast_question_response (answer_set )
259259 # We always multicast as well even if its a unicast
@@ -298,7 +298,7 @@ def updates_from_response(self, msg: DNSIncoming) -> None:
298298 address_adds : List [DNSAddress ] = []
299299 other_adds : List [DNSRecord ] = []
300300 removes : List [DNSRecord ] = []
301- now = current_time_millis ()
301+ now = msg . now
302302 for record in msg .answers :
303303
304304 updated = True
0 commit comments