lhotari commented on code in PR #23123:
URL: https://github.com/apache/pulsar/pull/23123#discussion_r1703292848


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java:
##########
@@ -3605,8 +3605,14 @@ public String clientSourceAddressAndPort() {
 
     @Override
     public CompletableFuture<Optional<Boolean>> checkConnectionLiveness() {
+        if (!isActive()) {
+            return CompletableFuture.completedFuture(Optional.of(false));
+        }
         if (connectionLivenessCheckTimeoutMillis > 0) {
             return 
NettyFutureUtil.toCompletableFuture(ctx.executor().submit(() -> {
+                if (!isActive()) {
+                    return 
CompletableFuture.completedFuture(Optional.of(false));
+                }

Review Comment:
   Please add a similar check to the `ctx.executor().schedule` block a few 
lines below



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