izumo27 commented on code in PR #25538:
URL: https://github.com/apache/pulsar/pull/25538#discussion_r3135461140


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/auth/oauth2/FlowBase.java:
##########
@@ -91,7 +127,40 @@ private AsyncHttpClient defaultHttpClient(Duration 
readTimeout, Duration connect
         return new DefaultAsyncHttpClient(confBuilder.build());
     }
 
+    protected void scheduleSslContextRefreshIfEnabled(long refreshSeconds) {
+        if (sslFactory == null || refreshSeconds <= 0 || sslRefreshScheduler 
!= null) {
+            return;
+        }
+        sslRefreshScheduler = Executors.newSingleThreadScheduledExecutor(
+                new 
ExecutorProvider.ExtendedThreadFactory("oauth2-tls-cert-refresher"));

Review Comment:
   When the client shuts down, the flow is closed, so there is no need to 
create daemon threads.
   
https://github.com/apache/pulsar/blob/v4.2.0/pulsar-client/src/main/java/org/apache/pulsar/client/impl/auth/oauth2/AuthenticationOAuth2.java#L316



-- 
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]

Reply via email to