You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/08/17 02:04:38 UTC

[GitHub] zhengyangyong commented on a change in pull request #876: [SCB-849] refactor producer connection limit using vertx metrics spi mechanism

zhengyangyong commented on a change in pull request #876: [SCB-849] refactor producer connection limit using vertx metrics spi mechanism
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/876#discussion_r210788698
 
 

 ##########
 File path: foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/server/TcpServer.java
 ##########
 @@ -67,19 +61,16 @@ public void init(Vertx vertx, String sslKey, AsyncResultCallback<InetSocketAddre
     }
 
     netServer.connectHandler(netSocket -> {
-      int connectedCount = connectedCounter.incrementAndGet();
+      int connectedCount = ((SCBDummyTCPMetrics) ((NetSocketImpl) netSocket).metrics()).getConnectedCounter().get();
 
 Review comment:
   ConnectionBase.metrics() is only for consumer side, will be null in Server side

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services