WillemJiang commented on a change in pull request #607: WIP [SCB-1577] Improve 
the transaction compensation mechanism for FSM
URL: https://github.com/apache/servicecomb-pack/pull/607#discussion_r349961051
 
 

 ##########
 File path: 
omega/omega-connector/omega-connector-grpc/src/main/java/org/apache/servicecomb/pack/omega/connector/grpc/core/ReconnectStreamObserver.java
 ##########
 @@ -42,10 +45,23 @@ public ReconnectStreamObserver(
   public void onError(Throwable t) {
     LOG.error("Failed to process grpc coordinate command.", t);
     loadContext.getGrpcOnErrorHandler().handle(messageSender);
+    cancelWait();
   }
 
   @Override
   public void onCompleted() {
     // Do nothing here
   }
+
+  public void cancelWait(){
+    latch.countDown();
+  }
+
+  public void waitConnected() {
 
 Review comment:
   When will you call the waitConnected?
   I don't think it's a good practice to introduce sync wait here.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to