Skip to content

Commit

Permalink
add try other app back
Browse files Browse the repository at this point in the history
  • Loading branch information
laywin committed Dec 17, 2023
1 parent 60b4adf commit a6af930
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions core/src/main/java/io/seata/core/rpc/netty/ChannelManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,20 @@ public static Channel getChannel(String resourceId, String clientId, boolean try
}
}

if (resultChannel == null && tryOtherApp) {
resultChannel = tryOtherApp(applicationIdMap, targetApplicationId);

if (resultChannel == null) {
if (LOGGER.isInfoEnabled()) {
LOGGER.info("No channel is available for resource[{}] as alternative of {}", resourceId, clientId);
}
} else {
if (LOGGER.isInfoEnabled()) {
LOGGER.info("Choose {} on the same resource[{}] as alternative of {}", resultChannel, resourceId, clientId);
}
}
}

return resultChannel;

}
Expand Down

0 comments on commit a6af930

Please sign in to comment.