Solve the bug: the persistent instance becomes a temporary instance after the console operation goes offline (#8517)

This commit is contained in:
胡俊 2022-06-10 10:06:37 +08:00 committed by GitHub
parent b8b34b81cc
commit bf1c06f82b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,8 +81,9 @@ public class ServiceStorage {
if (!ServiceManager.getInstance().containSingleton(service)) {
return result;
}
result.setHosts(getAllInstancesFromIndex(service));
serviceDataIndexes.put(service, result);
Service singleton = ServiceManager.getInstance().getSingleton(service);
result.setHosts(getAllInstancesFromIndex(singleton));
serviceDataIndexes.put(singleton, result);
return result;
}