From 2c3a9554ce3ba5b768727056012291c6d94bbdb4 Mon Sep 17 00:00:00 2001 From: Fabian Peller-Konrad <fabian.peller-konrad@kit.edu> Date: Thu, 15 Aug 2024 08:51:35 +0200 Subject: [PATCH] always update mns servers, also when just getting (ie not using) a proxy --- .../armem/client/MemoryNameSystem.cpp | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/source/RobotAPI/libraries/armem/client/MemoryNameSystem.cpp b/source/RobotAPI/libraries/armem/client/MemoryNameSystem.cpp index 608f5a662..8e60a9372 100644 --- a/source/RobotAPI/libraries/armem/client/MemoryNameSystem.cpp +++ b/source/RobotAPI/libraries/armem/client/MemoryNameSystem.cpp @@ -96,22 +96,15 @@ namespace armarx::armem::client mns::dto::MemoryServerInterfaces MemoryNameSystem::resolveServer(const MemoryID& memoryID) { - /*if (auto it = servers.find(memoryID.memoryName); it != servers.end()) + update(); + if (auto it = servers.find(memoryID.memoryName); it != servers.end()) { return it->second; } else - {*/ - update(); - if (auto it = servers.find(memoryID.memoryName); it != servers.end()) - { - return it->second; - } - else - { - throw error::CouldNotResolveMemoryServer(memoryID); - } - /*}*/ + { + throw error::CouldNotResolveMemoryServer(memoryID); + } } @@ -139,7 +132,7 @@ namespace armarx::armem::client { throw error::CouldNotResolveMemoryServer(memoryID, result.errorMessage); } - /*}*/ + } } mns::dto::MemoryServerInterfaces MemoryNameSystem::useServer(const MemoryID& memoryID) @@ -159,7 +152,7 @@ namespace armarx::armem::client mns::dto::MemoryServerInterfaces server = waitForServer(memoryID); // Add dependency. - component.usingProxy(server.reading->ice_getIdentity().name) + component.usingProxy(server.reading->ice_getIdentity().name); return server; } -- GitLab