IainHull commented on code in PR #385:
URL: https://github.com/apache/incubator-pekko/pull/385#discussion_r1228656411


##########
actor/src/main/scala/org/apache/pekko/io/dns/internal/DnsClient.scala:
##########
@@ -140,9 +157,25 @@ import pekko.pattern.{ BackoffOpts, BackoffSupervisor }
             log.debug("Client for id {} not found. Discarding unsuccessful 
response.", msg.id)
         }
       } else {
-        val (recs, additionalRecs) =
-          if (msg.flags.responseCode == ResponseCode.SUCCESS) (msg.answerRecs, 
msg.additionalRecs) else (Nil, Nil)
-        self ! Answer(msg.id, recs, additionalRecs)
+        inflightRequests.get(msg.id) match {
+          case Some((_, orig)) if !isSameQuestion(msg.questions, 
orig.questions) =>

Review Comment:
   There was a double bug here.  First the if expression was missing the `!`, 
then `isSameQuestion` was matching on a `Seq` with `List` extractors. The 
double negative caused the test to pass.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to