Merge pull request #25744 from akka/dontWarnAboutOldProtocolUse
Don't warn about old DNS protocol use
This commit is contained in:
commit
af240d77aa
1 changed files with 0 additions and 10 deletions
|
|
@ -70,7 +70,6 @@ private[io] final class AsyncDnsManager(val ext: DnsExt) extends Actor
|
|||
case Dns.Resolve(name) ⇒
|
||||
// adapt legacy protocol to new protocol
|
||||
log.debug("Resolution request for {} from {}", name, sender())
|
||||
warnAboutOldProtocolUse(name)
|
||||
val adapted = DnsProtocol.Resolve(name)
|
||||
val reply = (resolver ? adapted).mapTo[DnsProtocol.Resolved]
|
||||
.map { asyncResolved ⇒
|
||||
|
|
@ -85,14 +84,5 @@ private[io] final class AsyncDnsManager(val ext: DnsExt) extends Actor
|
|||
case CacheCleanup ⇒
|
||||
cacheCleanup.foreach(_.cleanup())
|
||||
}
|
||||
|
||||
private def warnAboutOldProtocolUse(name: String): Unit = {
|
||||
val warnAtMostTimes = 10
|
||||
if (oldProtocolWarningLoggedTimes < warnAtMostTimes) {
|
||||
oldProtocolWarningLoggedTimes += 1
|
||||
log.warning("Received Dns.Resolve({}) message while Async DNS resolver active. Please use the new API [akka.io.dns.DnsProtocol] to issue resolve requests. " +
|
||||
"(This warning will be logged at most {} times)", name, warnAtMostTimes)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue