Skip to content

Commit

Permalink
fix #1380
Browse files Browse the repository at this point in the history
  • Loading branch information
呈铭 committed Feb 27, 2024
1 parent bbdd019 commit b42f3f4
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@
* |--com.alipay.sofa.rpc.example.EchoService (next serviceName):grpc (protocol)
* |......
* </pre>
*
* Remark:
* Here we register service name with not only serviceName, but also with 'uniqueId' and 'protocol',
* because in Nacos, all service instances(with same service name) are only identified by ip and port,
* if there are two service with same service name but different uniqueId, there will be only one instance remained in instance list,
* and the consumer can't find the other instance from Nacos
* <p>
* Remark:
* Here we register service name with not only serviceName, but also with 'uniqueId' and 'protocol',
* because in Nacos, all service instances(with same service name) are only identified by ip and port,
* if there are two service with same service name but different uniqueId, there will be only one instance remained in instance list,
* and the consumer can't find the other instance from Nacos
* </p>
*
* @author <a href=mailto:[email protected]>JervyShi</a>
Expand Down Expand Up @@ -290,7 +290,7 @@ public List<ProviderGroup> subscribe(final ConsumerConfig config) {
try {
lock.lock();
providerObserver.addProviderListener(config, providerInfoListener);
}finally {
} finally {
lock.unlock();
}

Expand All @@ -306,7 +306,7 @@ public List<ProviderGroup> subscribe(final ConsumerConfig config) {
try {
lock.lock();
providerObserver.updateProviders(config, instances);
}finally {
} finally {
lock.unlock();
}
}
Expand Down

0 comments on commit b42f3f4

Please sign in to comment.