mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-11-30 02:37:58 +08:00
Fixed the rpc client do not work, when jsonrpc server register the same service to consul with jsonrpc and jsonrpc-http protocol. (#1553)
Co-authored-by: daydaygo <1252409767@qq.com> Co-authored-by: 李铭昕 <715557344@qq.com>
This commit is contained in:
parent
0e287e7dbb
commit
760fff0c16
@ -7,6 +7,7 @@
|
||||
|
||||
## Fixed
|
||||
|
||||
- [#1553](https://github.com/hyperf/hyperf/pull/1553) Fixed the rpc client do not work, when jsonrpc server register the same service to consul with jsonrpc and jsonrpc-http protocol.
|
||||
- [#1607](https://github.com/hyperf/hyperf/pull/1607) Fixed bug that the return value of function `go` is not adaptive with `swoole`.
|
||||
|
||||
# v1.1.26 - 2020-04-16
|
||||
|
@ -230,14 +230,14 @@ abstract class AbstractServiceClient
|
||||
$services = $health->service($this->serviceName)->json();
|
||||
$nodes = [];
|
||||
foreach ($services as $node) {
|
||||
$passing = true;
|
||||
$passing = false;
|
||||
$service = $node['Service'] ?? [];
|
||||
$checks = $node['Checks'] ?? [];
|
||||
|
||||
foreach ($checks as $check) {
|
||||
$status = $check['Status'] ?? false;
|
||||
if ($status !== 'passing') {
|
||||
$passing = false;
|
||||
if ($status === 'passing' && $this->protocol === $service['Meta']['Protocol']) {
|
||||
$passing = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user