Skip to content

Commit

Permalink
bugfix;区分插件的探测结果与最终返回结果。解决在配置多个探测插件情况下,一个组件探测失败,一个组件无结果,导致无最终探测结果的情况 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
davionchen authored Mar 14, 2023
1 parent ba1025e commit 911624d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,11 @@ private ServiceUpdateRequest buildInstanceUpdateResult(ServiceKey serviceKey,
private DetectResult detectInstance(Instance instance) throws PolarisException {
DetectResult result = null;
for (HealthChecker detector : extensions.getHealthCheckers()) {
result = detector.detectInstance(instance);
if (result == null) {
DetectResult pluginResult = detector.detectInstance(instance);
if (pluginResult == null) {
continue;
}
result = pluginResult;
if (result.getRetStatus() == RetStatus.RetSuccess) {
result.setDetectType(detector.getName());
return result;
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<properties>
<!-- Project revision -->
<revision>1.9.5</revision>
<revision>1.9.6</revision>

<timestamp>${maven.build.timestamp}</timestamp>
<skip.maven.deploy>false</skip.maven.deploy>
Expand Down

0 comments on commit 911624d

Please sign in to comment.