wujimin commented on a change in pull request #1046: [SCB-1095]Timer task need
catch all throwable to protected from unexpected error
URL:
https://github.com/apache/servicecomb-java-chassis/pull/1046#discussion_r244440669
##########
File path:
service-registry/src/main/java/org/apache/servicecomb/serviceregistry/registry/RemoteServiceRegistry.java
##########
@@ -91,7 +97,13 @@ public void run() {
@Subscribe
public void
onPullMicroserviceVersionsInstancesEvent(PullMicroserviceVersionsInstancesEvent
event) {
- taskPool.schedule(event.getMicroserviceVersions()::pullInstances,
event.getMsDelay(), TimeUnit.MILLISECONDS);
+ taskPool.schedule(() -> {
+ try {
+ event.getMicroserviceVersions().pullInstances();
Review comment:
pullInstances() invoked in multiple places, better to make pullInstances()
self safe
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services