You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/10/04 08:50:22 UTC

[GitHub] [pulsar] hangc0276 commented on a change in pull request #8197: fix pulsar service close exception

hangc0276 commented on a change in pull request #8197:
URL: https://github.com/apache/pulsar/pull/8197#discussion_r499221710



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
##########
@@ -215,7 +215,9 @@ public void channelInactive(ChannelHandlerContext ctx) throws Exception {
         super.channelInactive(ctx);
         isActive = false;
         log.info("Closed connection from {}", remoteAddress);
-        getBrokerService().getInterceptor().onConnectionClosed(this);
+        if (getBrokerService().getInterceptor() != null) {
+            getBrokerService().getInterceptor().onConnectionClosed(this);

Review comment:
       @eolivelli Thanks for your feedback. I will use the a local variable to avoid calling twice of getInterceptor.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org