fix feign report call result error when using feign direct call (#623)

pull/628/head
lepdou 2 years ago committed by GitHub
parent 30c9e495a1
commit add1ce423a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4,4 +4,5 @@
- [Optimize: remove discovery module useless code](https://github.com/Tencent/spring-cloud-tencent/pull/597)
- [Fix issue 579:Report the labels in request when report the result of invocation by RestTemplate](https://github.com/Tencent/spring-cloud-tencent/pull/600)
- [Optimize: optimize configuration conditional & optimize config data tips"](https://github.com/Tencent/spring-cloud-tencent/pull/605)
- [Optimize: Maybe remove Chinese characters](https://github.com/Tencent/spring-cloud-tencent/pull/609)
- [Optimize: Maybe remove Chinese characters](https://github.com/Tencent/spring-cloud-tencent/pull/609)
- [Bugfix: fix feign report call result error when using feign direct call](https://github.com/Tencent/spring-cloud-tencent/pull/623)

@ -75,7 +75,8 @@ public final class ReporterUtils {
resultRequest.setCallerService(new ServiceKey(sourceNamespace, sourceService));
}
resultRequest.setHost(uri.getHost());
resultRequest.setPort(uri.getPort());
// -1 means access directly by url, and use http default port number 80
resultRequest.setPort(uri.getPort() == -1 ? 80 : uri.getPort());
return resultRequest;
}

Loading…
Cancel
Save