Skip to content

Commit

Permalink
[ISSUE #367] fix alibaba dubbo initialize incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
yanhom1314 committed Dec 14, 2023
1 parent d72bd1d commit 5075cce
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ protected void initialize() {
handlers.forEach(handler -> {
val executor = handler.getExecutor();
if (executor instanceof ThreadPoolExecutor) {
String tpName = genTpName(handler.getUrl().getPort());
String port = String.valueOf(handler.getUrl().getPort());
String tpName = genTpName(port);
enhanceOriginExecutor(tpName, (ThreadPoolExecutor) executor, EXECUTOR_FIELD, handler);
dataStore.put(EXECUTOR_SERVICE_COMPONENT_KEY, tpName, handler.getExecutor());
dataStore.put(EXECUTOR_SERVICE_COMPONENT_KEY, port, handler.getExecutor());
}
});
}
Expand All @@ -95,7 +96,7 @@ protected String getTpPrefix() {
return TP_PREFIX;
}

private String genTpName(int port) {
private String genTpName(String port) {
return TP_PREFIX + "#" + port;
}
}

0 comments on commit 5075cce

Please sign in to comment.