lhotari commented on code in PR #24790:
URL: https://github.com/apache/pulsar/pull/24790#discussion_r2384273737
##########
pulsar-common/src/main/java/org/apache/pulsar/common/util/netty/DnsResolverUtil.java:
##########
@@ -61,8 +75,15 @@ public class DnsResolverUtil {
.map(Integer::decode)
.filter(i -> i > 0)
.orElseGet(() -> {
- if (System.getSecurityManager() == null) {
- return JDK_DEFAULT_TTL;
+ try {
+ if (System.getSecurityManager() == null) {
+ return JDK_DEFAULT_TTL;
+ }
+ } catch (Throwable t) {
+ log.warn("Cannot use current logic to resolve JDK
default DNS TTL settings. Use "
+ + "sun.net.inetaddr.ttl and
sun.net.inetaddr.negative.ttl system "
+ + "properties for setting default
values for DNS TTL settings. {}",
+ t.getMessage());
}
Review Comment:
this is fine and intentional
--
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]